Financial
Accounting Rules
Every posting rule the ledger applies, written out for review. The engine guarantees each entry balances — it refuses to write one that does not — but balanced is not the same as correct. The items flagged below need an accountant’s decision before these books are relied upon.
Costing method: FIFOLedger: balanced ($0.00)4 items flagged for review
Flagged for accountant review (4)
- InvoiceRevenue recognition point. If performance obligations are satisfied over time, ASC 606 requires deferral rather than point-of-invoice recognition.
- PaymentApplication is oldest-first automatic; a user cannot yet choose which invoices to pay from the UI, and discounts (Disc. Avail. / Disc. Taken) are captured structurally but not calculated.
- Credit Card ChargeStill posts to a single expense account. Card charges should pick an account per line the way bills and expense reports now do — the same accountForCategory() mapping would serve.
- Item FulfillmentIf goods ship in one period and invoice in another, COGS and revenue land in different periods. Shipment-based COGS recognition may be required for cut-off accuracy.
Posting rules by transaction type
| Transaction | Posts? | Debit | Credit | Notes |
|---|---|---|---|---|
| Invoice | Yes |
|
| Revenue is recognised on invoice. COGS consumes real cost layers (FIFO by default). Review: Revenue recognition point. If performance obligations are satisfied over time, ASC 606 requires deferral rather than point-of-invoice recognition. |
| Cash Sale | Yes |
|
| Same as invoice but cash is received immediately, so it lands in undeposited funds rather than A/R. |
| Credit Memo | Yes |
|
| RESOLVED — returned goods now re-enter stock at their current weighted-average cost and the original cost of sale is reversed, so inventory and COGS stay honest after a credit. |
| Cash Refund | Yes |
|
| RESOLVED — same restocking treatment as a credit memo. |
| Payment | Yes |
|
| RESOLVED — payments now apply against specific open invoices oldest-first through an Apply grid (lib/payment-application.ts). Applied/unapplied amounts are recorded per document and invoices flip to Paid In Full once fully settled, so aging reflects real open balances. Review: Application is oldest-first automatic; a user cannot yet choose which invoices to pay from the UI, and discounts (Disc. Avail. / Disc. Taken) are captured structurally but not calculated. |
| Customer Deposit | Yes |
|
| RESOLVED — a deposit is unearned revenue and now credits a liability account rather than reducing A/R. |
| Bill | Yes |
|
| RESOLVED — each expense line posts to its own account, so a bill can mix inventory and expense purchases correctly. Item lines still clear the GR/IR accrual raised by the receipt; freight and rounding fall to GR/IR so the entry always balances. Line-level department/class/location are carried through. |
| Bill Credit | Yes |
|
| |
| Bill Payment | Yes |
|
| |
| Check | Yes |
|
| |
| Item Receipt | Yes |
|
| RESOLVED — receipts now credit a GR/IR clearing account which the vendor bill debits, so a receipt and its bill can no longer double-count. Also receives stock into cost layers. |
| Expense Report | Yes |
|
| RESOLVED — lines post by category via accountForCategory() in lib/gl.ts, so travel, meals and software land in their own accounts rather than one hard-coded expense line. |
| Bank Deposit | Yes |
|
| RESOLVED — the chart now carries a dedicated 1090 Undeposited Funds account, matching the chart the account was modelled from. |
| Credit Card Charge | Yes |
|
| Review: Still posts to a single expense account. Card charges should pick an account per line the way bills and expense reports now do — the same accountForCategory() mapping would serve. |
| Credit Card Refund | Yes |
|
| |
| Inventory Adjustment | Yes |
|
| RESOLVED — adjustments now hit a dedicated shrinkage account rather than COGS directly. |
| Journal Entry | Yes |
|
| Accounts come from the line grid. The engine rejects the entry if debits do not equal credits. |
| Sales Order | No | — | — | A commitment, not an accounting event. Posts when invoiced or fulfilled. |
| Purchase Order | No | — | — | A commitment. Posts on receipt or bill. |
| Estimate / Quote | No | — | — | No accounting effect. |
| Transfer Order | No | — | — | No GL effect between locations in a single subsidiary. |
| Item Fulfillment | No | — | — | Consumes inventory layers for costing but does not itself post; COGS is recognised on the invoice. Review: If goods ship in one period and invoice in another, COGS and revenue land in different periods. Shipment-based COGS recognition may be required for cut-off accuracy. |