Skip to content

Ledger Reports ​

Overview ​

The Ledger is the central financial record-keeping system in Zal Ultra. It tracks every balance change for both users (resellers) and subscribers, providing a complete audit trail of all financial transactions.


Ledger Types ​

TypeIDDescriptionColor
Payment/Topup1Balance added to accountGreen (+) / Red (-)
Withdraw2Balance withdrawnRed
Invoice3Invoice payment/chargeRed
Profit4Profit distributionGreen

Understanding Ledger Entries ​

Entry Structure ​

Each ledger entry contains:

FieldDescription
transaction_idUnique transaction reference
ledger_typeType of transaction (1-4)
to_profile_type1 = User, 2 = Subscriber
to_idID of balance holder
to_usernameUsername of balance holder
amountTransaction amount (+/-)
previous_balanceBalance before transaction
balanceBalance after transaction
against_profile_typeCounter-party type
against_idCounter-party ID
invoices_idRelated invoice (if any)
payments_idRelated payment (if any)
no_balance_changeTrue for tracking-only entries
action_by_idWho performed the action

How Ledger Works ​

Balance Calculation ​

The ledger maintains a running balance:

New Balance = Previous Balance + Amount

Example:
Previous Balance: 500 BDT
Amount: +100 BDT (topup)
New Balance: 600 BDT

The no_balance_change Flag ​

This important flag determines if the transaction affects actual balance:

ValueMeaningUse Case
falseBalance IS changedNormal transactions
trueBalance NOT changedTracking/audit only

Example: Cash payments are tracked but don't change system balance because money is exchanged outside the system.


Ledger Entry Examples ​

1. Subscriber Balance Topup ​

Type: Payment (1)
To: Subscriber
Amount: +500 BDT
Previous: 0 BDT
Balance: 500 BDT
Note: "Admin topped up subscriber balance"

2. Subscriber Activation (Prepaid) ​

Type: Invoice (3)
To: Subscriber
Amount: -300 BDT
Previous: 500 BDT
Balance: 200 BDT
Note: "Package activation payment"

3. Reseller Profit ​

Type: Profit (4)
To: Reseller
Amount: +50 BDT
Previous: 1000 BDT
Balance: 1050 BDT
Note: "Profit from subscriber activation"

4. Reseller Balance Cut (Postpaid) ​

Type: Invoice (3)
To: Reseller
Amount: -250 BDT
Previous: 1000 BDT
Balance: 750 BDT
Note: "Subscriber activation - upstream cost"

Viewing Ledger Reports ​

Navigate to Accounting → Ledger Reports to access the ledger.

Ledger Report

Report Views ​

ViewDescription
Standard ViewTable format with all columns
Detailed ViewNarrative format with full context

Filter Options ​

Use filters to find specific transactions:

Ledger Filter

FilterDescription
SearchFind by transaction ID, username, amount, or note
Date RangeFilter by time period
Profile TypeUsers or Subscribers
Select User/SubscriberSpecific account
Along With SubscribersInclude subscriber transactions for user
Ledger TypePayment, Withdraw, Invoice, or Profit
Action ByWho performed the transaction

Search Tips ​

  • Use #123 to search by invoice ID
  • Use @456 to search by payment ID
  • Search by username or transaction ID

Export Options ​

Excel Export ​

Ledger Excel Export

  1. Apply desired filters
  2. Click Excel Export
  3. Wait for file generation
  4. Download .xlsx file

CSV Export ​

Ledger CSV Export

  1. Apply desired filters
  2. Click CSV Export
  3. Wait for file generation
  4. Download .csv file

Data Isolation ​

Ledger data is filtered based on user permissions:

Admin/Staff ​

  • View all ledger entries
  • Filter by any user or subscriber

Reseller ​

  • Own ledger entries
  • Own subscribers' entries
  • Sub-resellers' and retailers' entries

Sub-Reseller ​

  • Own ledger entries
  • Own subscribers' entries
  • Retailers' entries

Retailer ​

  • Own ledger entries
  • Own subscribers' entries only

Common Use Cases ​

Check Subscriber Balance History ​

  1. Filter by Profile Type: Subscriber
  2. Select the subscriber
  3. View all balance changes

Track Reseller Profits ​

  1. Filter by Profile Type: Reseller
  2. Select the reseller
  3. Filter by Ledger Type: Profit
  4. View all profit entries

Audit Specific Transaction ​

  1. Search by transaction ID or invoice ID
  2. View complete transaction details
  3. Check related invoice/payment links

www.onezeroart.com