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)
  • Invoice
    Revenue recognition point. If performance obligations are satisfied over time, ASC 606 requires deferral rather than point-of-invoice recognition.
  • Payment
    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.
  • Credit Card Charge
    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.
  • Item Fulfillment
    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.
Posting rules by transaction type
TransactionPosts?DebitCreditNotes
InvoiceYes
  • 1100 Accounts Receivable — gross (net + tax + shipping)
  • 5000 Cost of Goods Sold — actual layer cost
  • 4000 Product Revenue — net
  • 4030 Shipping Revenue — freight
  • 2200 Sales Tax Payable — computed tax
  • 1200 Inventory — actual layer cost
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 SaleYes
  • Undeposited Funds — gross
  • Cost of Goods Sold — actual layer cost
  • Product Revenue
  • Sales Tax Payable
  • Inventory Asset
Same as invoice but cash is received immediately, so it lands in undeposited funds rather than A/R.
Credit MemoYes
  • 4000 Product Revenue — net
  • 4030 Shipping Revenue — freight
  • 2200 Sales Tax Payable — tax reversal
  • 1200 Inventory — goods returned to stock
  • 1100 Accounts Receivable — gross
  • 5000 Cost of Goods Sold — cost of sale reversed
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 RefundYes
  • 4000 Product Revenue
  • 2200 Sales Tax Payable
  • 1200 Inventory — goods returned
  • 1010 Checking - Wexbourne US
  • 5000 Cost of Goods Sold — cost of sale reversed
RESOLVED — same restocking treatment as a credit memo.
PaymentYes
  • 1010 Checking - Wexbourne US or 1090 Undeposited Funds
  • 1100 Accounts Receivable
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 DepositYes
  • 1090 Undeposited Funds
  • 2130 Customer Deposits
RESOLVED — a deposit is unearned revenue and now credits a liability account rather than reducing A/R.
BillYes
  • The account named on EACH LINE — rent, software, repairs, inventory …
  • 2030 Goods Received Not Invoiced — item lines with no account
  • 2220 VAT Receivable — input tax
  • 2010 Accounts Payable - Trade — gross
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 CreditYes
  • Accounts Payable
  • Inventory Asset
Bill PaymentYes
  • Accounts Payable
  • Checking Account
CheckYes
  • Accounts Payable
  • Checking Account
Item ReceiptYes
  • 1200 Inventory
  • 2030 Goods Received Not Invoiced
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 ReportYes
  • The account for each line's expense category — Travel, Meals, Software, Office Supplies …
  • 2010 Accounts Payable - Trade
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 DepositYes
  • 1010 Checking - Wexbourne US
  • 1090 Undeposited Funds
RESOLVED — the chart now carries a dedicated 1090 Undeposited Funds account, matching the chart the account was modelled from.
Credit Card ChargeYes
  • 6300 Software and Subscriptions
  • 2150 Credit Card Payable
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 RefundYes
  • Credit Card Payable
  • Software & Subscriptions
Inventory AdjustmentYes
  • 1200 Inventory
  • 5020 Inventory Shrinkage
RESOLVED — adjustments now hit a dedicated shrinkage account rather than COGS directly.
Journal EntryYes
  • Per line
  • Per line
Accounts come from the line grid. The engine rejects the entry if debits do not equal credits.
Sales OrderNo——A commitment, not an accounting event. Posts when invoiced or fulfilled.
Purchase OrderNo——A commitment. Posts on receipt or bill.
Estimate / QuoteNo——No accounting effect.
Transfer OrderNo——No GL effect between locations in a single subsidiary.
Item FulfillmentNo——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.
MC