Skip to content

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

  1. How It Works
  2. Invoice Entry Types
  3. Inventory Integration
  4. Step-by-Step Guide
  5. Invoice Structure
  6. 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 charges

How It Works:

  1. Select "Custom" entry type
  2. Enter title (e.g., "Installation Fee")
  3. Enter amount (e.g., 500 BDT)
  4. Add to invoice

Example:

Title: Installation Fee
Amount: 500 BDT

Type 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 equipment

How It Works:

  1. Select "Inventory Item" entry type
  2. Choose item from dropdown
  3. Enter quantity
  4. System auto-calculates selling price
  5. Item assigned to subscriber

Selling Price Calculation:

Method 1: Percentage Markup

Selling Price = Purchase Price + (Purchase Price × Markup %)
Example: 1000 + (1000 × 20%) = 1200 BDT

Method 2: Flat-Rate Markup

Selling Price = Purchase Price + Markup Amount
Example: 1000 + 200 = 1200 BDT

Total Amount:

Total = Selling Price × Quantity
Example: 1200 × 2 = 2400 BDT

Inventory 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 InventoryAssignment record
  • 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_id in 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 BDT

Step-by-Step Guide

Step 1: Access Custom Invoice

From Multiple Locations:

Option 1: From Home Dashboard

  1. Go to Home
  2. Click "Generate Custom Invoice"
  3. Source page: home_page

Option 2: From Subscriber Profile

  1. Go to Subscriber Profile
  2. Click "Generate Invoice" button
  3. Source page: subscriber_profile_page

Option 3: From Invoice Page

  1. Go to Invoices
  2. Click "Generate Custom Invoice"
  3. Source page: invoice_page

Step 2: Select Subscriber

  1. Search and select subscriber
  2. Subscriber must exist in system
  3. System validates subscriber

Step 3: Add Line Items

For Custom Items:

  1. Click "Add More" button
  2. Select Entry Type: "Custom"
  3. Enter Title (e.g., "Installation Fee")
  4. Enter Amount (e.g., 500)
  5. Repeat for multiple items

For Inventory Items:

  1. Click "Add More" button
  2. Select Entry Type: "Inventory Item"
  3. Select Item from dropdown
  4. Enter Quantity
  5. System auto-calculates amount
  6. 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

  1. Click "Submit" or "Generate" button
  2. Wait for processing
  3. System creates invoice
  4. 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 ID
  • subscriber_username - Subscriber username
  • subscriber_salesperson_id - Salesperson ID
  • subscriber_salesperson_username - Salesperson username

Invoice Details:

  • activation_unique_id - Unique identifier (links all records)
  • activation_extra_fee_group - Same as unique ID
  • activation_extra_fee_total - Total extra fees
  • invoice_type - 2 (Custom Invoice)
  • invoice_status - 6 (DUE)

Billing Information:

  • billing_total_amount - Total invoice amount
  • billing_paid_amount - 0 (initially)
  • billing_due_amount - Total invoice amount
  • billing_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 package
  • action_by_id - User who generated invoice
  • action_by_username - Username who generated
  • isp_id - ISP ID
  • branch_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 selected

2. Prepare Line Items

✅ List all charges
✅ Verify amounts
✅ Check inventory availability
✅ Confirm quantities

3. Check Inventory Items

✅ Items exist in inventory
✅ Selling prices configured
✅ Unit types correct
✅ Markup settings verified

During Generation

1. Add Items Carefully

✅ Use correct entry type
✅ Enter accurate titles
✅ Verify amounts
✅ Check quantities

2. Review Before Submit

✅ All items added
✅ Total amount correct
✅ No duplicate items
✅ Inventory items selected properly

3. Multiple Items

✅ Use "Add More" for each item
✅ Can mix custom and inventory items
✅ Delete unwanted items before submit
✅ No limit on number of items

After 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 correct

3. Notify Subscriber

✅ Inform subscriber of invoice
✅ Provide invoice details
✅ Explain due date
✅ Collect payment

Common Use Cases

Use Case 1: Router Sale

Scenario:

Subscriber needs a new router
Router cost: 2500 BDT
Selling price: 3000 BDT (20% markup)

Steps:

  1. Access Custom Invoice
  2. Select subscriber
  3. Add inventory item: "TP-Link Router"
  4. Quantity: 1
  5. System calculates: 3000 BDT
  6. 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 BDT

Steps:

  1. Access Custom Invoice
  2. Select subscriber
  3. Add custom item: "Installation Fee" - 500 BDT
  4. Add inventory item: "TP-Link Router" - Qty 1
  5. Add inventory item: "Ethernet Cable" - Qty 10 meters
  6. 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 BDT

Steps:

  1. Access Custom Invoice
  2. Select subscriber
  3. Add custom item: "Reconnection Fee" - 300 BDT
  4. Add custom item: "Late Payment Penalty" - 100 BDT
  5. 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 BDT

Steps:

  1. Access Custom Invoice
  2. Select subscriber
  3. Add inventory item: "ONU Device" - Qty 1
  4. Add custom item: "Installation Fee" - 500 BDT
  5. 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 BDT

Steps:

  1. Access Custom Invoice
  2. Select subscriber
  3. Add inventory item: "Ethernet Cable" - Qty 20
  4. Add inventory item: "RJ45 Connector" - Qty 10
  5. 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!

www.onezeroart.com