Appearance
Subscriber Custom Invoice
Overview
Custom Invoice Generation allows you to create invoices for subscribers outside of regular package activation billing. This feature supports both custom line items and inventory item assignments, making it perfect for one-time charges, equipment sales, installation fees, or any additional services.
WHAT IS CUSTOM INVOICE?
Custom Invoice is a flexible billing feature that:
- Two Entry Types - Custom items or Inventory items
- Inventory Integration - Assign physical items to subscribers
- Flexible Billing - Add any charges outside package fees
- Auto Calculation - Inventory items auto-calculate selling price
- Multiple Items - Add unlimited line items per invoice
- Due Invoice - Invoice created as DUE (status 6)
- 7-Day Payment - Default 7-day payment due date
Perfect for: Equipment sales, installation fees, service charges, one-time fees!
📋 Table of Contents
- How It Works
- Invoice Entry Types
- Inventory Integration
- Step-by-Step Guide
- Invoice Structure
- Best Practices
How It Works
The Process
1. Select Subscriber → 2. Choose Entry Type (Custom/Inventory) →
3. Add Line Items → 4. Generate Invoice → 5. Invoice Created (DUE) →
6. Inventory Assigned (if applicable)What Happens When You Generate
Automatic Actions:
- ✅ Invoice created with status 6 (DUE)
- ✅ Invoice type set to 2 (Custom Invoice)
- ✅ Activation extra fees recorded
- ✅ Inventory items assigned to subscriber (if applicable)
- ✅ Invoice linked to inventory assignments
- ✅ Billing due date set (+7 days)
- ✅ Total amount calculated
- ✅ Activity logged
Invoice Entry Types
Type 1: Custom Line Items
What It Is:
- Manual entry of title and amount
- No inventory tracking
- Simple one-time charges
- Flexible descriptions
Use Cases:
✅ Installation fees
✅ Service charges
✅ Consultation fees
✅ Late payment penalties
✅ Reconnection fees
✅ Any custom chargesHow It Works:
- Select "Custom" entry type
- Enter title (e.g., "Installation Fee")
- Enter amount (e.g., 500 BDT)
- Add to invoice
Example:
Title: Installation Fee
Amount: 500 BDTType 2: Inventory Items
What It Is:
- Select from inventory items
- Auto-calculates selling price
- Tracks item assignment
- Quantity-based pricing
Use Cases:
✅ Router sales
✅ ONU/ONT devices
✅ Cables and accessories
✅ Set-top boxes
✅ Any physical equipmentHow It Works:
- Select "Inventory Item" entry type
- Choose item from dropdown
- Enter quantity
- System auto-calculates selling price
- Item assigned to subscriber
Selling Price Calculation:
Method 1: Percentage Markup
Selling Price = Purchase Price + (Purchase Price × Markup %)
Example: 1000 + (1000 × 20%) = 1200 BDTMethod 2: Flat-Rate Markup
Selling Price = Purchase Price + Markup Amount
Example: 1000 + 200 = 1200 BDTTotal Amount:
Total = Selling Price × Quantity
Example: 1200 × 2 = 2400 BDTInventory Integration
What Gets Tracked
Inventory Assignment Record:
- Item ID
- Subscriber ID
- Invoice Unique ID
- Purchase Price
- Item Quantity
- Item Unit Type (Piece, Meter, etc.)
- Selling Price
- Status (1 = Assigned, 2 = Returned)
- Assigned By (User ID and Username)
- ISP and Branch ID
Inventory Assignment Process
Step 1: Item Selection
- User selects inventory item
- System loads item details:
- Name
- Unit Type
- Purchase Price
- Selling Accounting Type
- Selling Accounting Amount
Step 2: Price Calculation
- System calculates selling price based on accounting type
- Multiplies by quantity
- Total amount calculated
Step 3: Assignment Creation
- Creates
InventoryAssignmentrecord - Links to invoice via
invoice_unique_id - Status set to 1 (Assigned)
- Assigned by current user
Step 4: Invoice Linking
- After invoice saved
- System updates
invoice_idin inventory assignments - Links inventory to invoice permanently
Inventory Item Details
Required Fields:
- Item ID - Inventory item identifier
- Name - Item name (e.g., "TP-Link Router")
- Unit Type - Piece, Meter, Box, etc.
- Purchase Price - Cost price
- Selling Accounting Type:
- 1 = Percentage markup
- 2 = Flat-rate markup
- Selling Accounting Amount - Markup value
Example Inventory Item:
Name: TP-Link Archer C6 Router
Unit Type: Piece
Purchase Price: 2500 BDT
Selling Accounting Type: 1 (Percentage)
Selling Accounting Amount: 20%
Calculated Selling Price: 3000 BDTStep-by-Step Guide
Step 1: Access Custom Invoice
From Multiple Locations:
Option 1: From Home Dashboard
- Go to Home
- Click "Generate Custom Invoice"
- Source page:
home_page
Option 2: From Subscriber Profile
- Go to Subscriber Profile
- Click "Generate Invoice" button
- Source page:
subscriber_profile_page
Option 3: From Invoice Page
- Go to Invoices
- Click "Generate Custom Invoice"
- Source page:
invoice_page
Step 2: Select Subscriber
- Search and select subscriber
- Subscriber must exist in system
- System validates subscriber
Step 3: Add Line Items
For Custom Items:
- Click "Add More" button
- Select Entry Type: "Custom"
- Enter Title (e.g., "Installation Fee")
- Enter Amount (e.g., 500)
- Repeat for multiple items
For Inventory Items:
- Click "Add More" button
- Select Entry Type: "Inventory Item"
- Select Item from dropdown
- Enter Quantity
- System auto-calculates amount
- Repeat for multiple items
Step 4: Review Invoice
Check:
- ✅ All line items added
- ✅ Amounts correct
- ✅ Inventory items selected
- ✅ Quantities correct
- ✅ Total amount calculated
Step 5: Generate Invoice
- Click "Submit" or "Generate" button
- Wait for processing
- System creates invoice
- System assigns inventory (if applicable)
Step 6: Review Results
Success Message:
Successfully Generated.What Happened:
- Invoice created with DUE status
- Invoice ID assigned
- Inventory items assigned to subscriber
- Invoice linked to inventory assignments
- Redirected to source page
Redirect Behavior:
- From Home → Redirects to Home
- From Subscriber Profile → Redirects to Subscriber Profile
- From Invoice Page → Redirects to Invoice Page
Invoice Structure
Invoice Fields
Subscriber Information:
subscriber_id- Subscriber IDsubscriber_username- Subscriber usernamesubscriber_salesperson_id- Salesperson IDsubscriber_salesperson_username- Salesperson username
Invoice Details:
activation_unique_id- Unique identifier (links all records)activation_extra_fee_group- Same as unique IDactivation_extra_fee_total- Total extra feesinvoice_type- 2 (Custom Invoice)invoice_status- 6 (DUE)
Billing Information:
billing_total_amount- Total invoice amountbilling_paid_amount- 0 (initially)billing_due_amount- Total invoice amountbilling_due_date- Current date + 7 days
Payment Information:
payment_method- 1 (Credit/Due)payment_id- null (no payment yet)payment_date- null (no payment yet)
Other Fields:
service_type- 1 (Internet)package_id- Subscriber's current packageaction_by_id- User who generated invoiceaction_by_username- Username who generatedisp_id- ISP IDbranch_id- Branch ID
Invoice Status Codes
Status Values:
- 1 = Active
- 2 = Disable/Cancel
- 3 = Delete
- 4 = Paid
- 5 = Partial Paid
- 6 = Due (Custom invoices start here)
- 7 = Reverted
Invoice Type Codes
Type Values:
- 1 = Activation Invoice (package activation)
- 2 = Custom Invoice (this feature)
Best Practices
Before Generating
1. Verify Subscriber
✅ Subscriber exists
✅ Subscriber is active
✅ Correct subscriber selected2. Prepare Line Items
✅ List all charges
✅ Verify amounts
✅ Check inventory availability
✅ Confirm quantities3. Check Inventory Items
✅ Items exist in inventory
✅ Selling prices configured
✅ Unit types correct
✅ Markup settings verifiedDuring Generation
1. Add Items Carefully
✅ Use correct entry type
✅ Enter accurate titles
✅ Verify amounts
✅ Check quantities2. Review Before Submit
✅ All items added
✅ Total amount correct
✅ No duplicate items
✅ Inventory items selected properly3. Multiple Items
✅ Use "Add More" for each item
✅ Can mix custom and inventory items
✅ Delete unwanted items before submit
✅ No limit on number of itemsAfter Generation
1. Verify Invoice
✅ Invoice created successfully
✅ Invoice status is DUE (6)
✅ Total amount correct
✅ Due date set (+7 days)2. Check Inventory
✅ Items assigned to subscriber
✅ Assignment status is 1 (Assigned)
✅ Invoice ID linked to assignments
✅ Quantities correct3. Notify Subscriber
✅ Inform subscriber of invoice
✅ Provide invoice details
✅ Explain due date
✅ Collect paymentCommon Use Cases
Use Case 1: Router Sale
Scenario:
Subscriber needs a new router
Router cost: 2500 BDT
Selling price: 3000 BDT (20% markup)Steps:
- Access Custom Invoice
- Select subscriber
- Add inventory item: "TP-Link Router"
- Quantity: 1
- System calculates: 3000 BDT
- Generate invoice
Result:
- Invoice created: 3000 BDT (DUE)
- Router assigned to subscriber
- Due date: +7 days
Use Case 2: Installation Package
Scenario:
New subscriber installation
Installation fee: 500 BDT
Router: 3000 BDT
Cable (10 meters): 200 BDT
Total: 3700 BDTSteps:
- Access Custom Invoice
- Select subscriber
- Add custom item: "Installation Fee" - 500 BDT
- Add inventory item: "TP-Link Router" - Qty 1
- Add inventory item: "Ethernet Cable" - Qty 10 meters
- Generate invoice
Result:
- Invoice created: 3700 BDT (DUE)
- Router and cable assigned
- Due date: +7 days
Use Case 3: Service Charges
Scenario:
Subscriber reconnection
Reconnection fee: 300 BDT
Late payment penalty: 100 BDT
Total: 400 BDTSteps:
- Access Custom Invoice
- Select subscriber
- Add custom item: "Reconnection Fee" - 300 BDT
- Add custom item: "Late Payment Penalty" - 100 BDT
- Generate invoice
Result:
- Invoice created: 400 BDT (DUE)
- No inventory assigned
- Due date: +7 days
Use Case 4: Equipment Upgrade
Scenario:
Subscriber upgrading equipment
New ONU: 4000 BDT
Installation: 500 BDT
Old equipment return credit: -1000 BDT (handled separately)
Total: 4500 BDTSteps:
- Access Custom Invoice
- Select subscriber
- Add inventory item: "ONU Device" - Qty 1
- Add custom item: "Installation Fee" - 500 BDT
- Generate invoice
Result:
- Invoice created: 4500 BDT (DUE)
- ONU assigned to subscriber
- Due date: +7 days
Use Case 5: Bulk Accessories
Scenario:
Subscriber buying accessories
Ethernet cables: 20 meters @ 20 BDT/meter = 400 BDT
Connectors: 10 pieces @ 10 BDT/piece = 100 BDT
Total: 500 BDTSteps:
- Access Custom Invoice
- Select subscriber
- Add inventory item: "Ethernet Cable" - Qty 20
- Add inventory item: "RJ45 Connector" - Qty 10
- Generate invoice
Result:
- Invoice created: 500 BDT (DUE)
- Cables and connectors assigned
- Due date: +7 days
Summary
Custom Invoice Generation is a flexible billing feature that:
✅ Two Entry Types:
- Custom items (manual title and amount)
- Inventory items (auto-calculated from inventory)
✅ Inventory Integration:
- Assigns physical items to subscribers
- Tracks item assignments
- Links inventory to invoices
- Supports quantity-based pricing
✅ Flexible Billing:
- Add unlimited line items
- Mix custom and inventory items
- Auto-calculates totals
- Supports percentage and flat-rate markup
✅ Invoice Management:
- Invoice type: 2 (Custom Invoice)
- Invoice status: 6 (DUE)
- Payment method: 1 (Credit/Due)
- Due date: +7 days default
✅ Multiple Access Points:
- From Home dashboard
- From Subscriber profile
- From Invoice page
- Redirects back to source
✅ Complete Tracking:
- Unique ID links all records
- Inventory assignments tracked
- Invoice linked to assignments
- Activity logged
Perfect for ISPs wanting to bill subscribers for equipment, services, and one-time charges outside of regular package activation billing!
