# Step 20 accounting model

All amounts are integer paisa. The app uses a balanced two-line journal for each posting:

- Commission accrued: Dr `commission_expense`; Cr `reseller_payable`.
- Commission reversal: Dr `reseller_payable`; Cr `commission_expense`.
- Payout completed: Dr `reseller_payable`; Cr `cash_or_bank`.

Available payout balance = posted credit balance in `reseller_payable` for that reseller minus requested/under-review/approved payouts. A payout request reserves balance but does not post a cash journal. The payout journal is written only when an admin records the real transfer reference and marks an approved payout as paid.

No automated fee, tax, supplier cost, platform commission rate or return-window length is assumed. These need a separately approved business rule before they can be automated.
