; Accounts payable starter ledger for Beancount. ; ; Generated from blog/2025-08-20-what-is-accounts-payable.md ; (fence marked `; accounts-payable-starter — complete runnable AP workflow`). ; Do not edit by hand — regenerate with: ; yarn generate:ap-starter ; ; Sample data: every name, amount and date below is fictional. ; No invoice PDF or documents folder is required to load this file. ; ; Validate with the pinned toolchain (Beancount 3.2.3): ; uvx --from beancount==3.2.3 bean-check public/downloads/accounts-payable-starter.bean ; ; Open-item as of 2025-09-04 (beanquery 0.2.0): ; uvx --from beanquery==0.2.0 --with beancount==3.2.3 \ ; bean-query public/downloads/accounts-payable-starter.bean \ ; "SELECT payee, any_meta('invoice') AS invoice, any_meta('due') AS due, -SUM(number) AS outstanding WHERE account ~ '^Liabilities:AccountsPayable' AND date <= 2025-09-04 GROUP BY payee, invoice, due HAVING SUM(number) < 0 ORDER BY due, payee" ; ; Expected balances after full load: ; Assets:Bank:Checking: 3150.00 USD ; Equity:Opening-Balances: -5000.00 USD ; Expenses:Office: 350.00 USD ; Expenses:Parts: 1650.00 USD ; Expenses:Supplies:Paint: 500.00 USD ; Liabilities:AccountsPayable: -650.00 USD ; Expected open outstanding sum as of 2025-09-04: 1500.00 (Forest settled / absent; Acme 800.00). ; accounts-payable-starter — complete runnable AP workflow option "operating_currency" "USD" 2025-01-01 open Assets:Bank:Checking USD 2025-01-01 open Equity:Opening-Balances USD 2025-01-01 open Liabilities:AccountsPayable USD 2025-01-01 open Expenses:Supplies:Paint USD 2025-01-01 open Expenses:Parts USD 2025-01-01 open Expenses:Office USD 2025-01-01 open Income:Discounts:Payables USD ; Fictional opening cash — enough to cover every payment in this ledger 2025-01-01 * "Opening balance" Assets:Bank:Checking 5000.00 USD Equity:Opening-Balances -5000.00 USD ; Settled before as-of — must disappear from the open report 2025-08-05 * "Forest Paint Supply" "Paint order INV-10455" ^INV-10455 #ap invoice: "INV-10455" due: "2025-09-04" Expenses:Supplies:Paint 500.00 USD Liabilities:AccountsPayable -500.00 USD 2025-09-01 * "Forest Paint Supply" "Payment INV-10455" ^INV-10455 invoice: "INV-10455" due: "2025-09-04" Liabilities:AccountsPayable 500.00 USD Assets:Bank:Checking -500.00 USD ; Early-payment discount alternatives for INV-10455 — mutually exclusive with ; the standard payment above AND with each other. To take 2/10 instead: delete ; (or comment out) the 2025-09-01 payment, then uncomment EXACTLY ONE option. ; Never leave both options active — that clears AP twice. ; ; Option 1: Record the discount as other income ; 2025-08-12 * "Forest Paint Supply" "Early payment discount INV-10455" ^INV-10455 ; invoice: "INV-10455" ; due: "2025-09-04" ; Liabilities:AccountsPayable 500.00 USD ; Assets:Bank:Checking -490.00 USD ; Income:Discounts:Payables -10.00 USD ; ; Option 2: Reduce the original expense directly ; 2025-08-12 * "Forest Paint Supply" "Early payment discount INV-10455" ^INV-10455 ; invoice: "INV-10455" ; due: "2025-09-04" ; Liabilities:AccountsPayable 500.00 USD ; Assets:Bank:Checking -490.00 USD ; Expenses:Supplies:Paint -10.00 USD ; Partial before as-of; final $800 payment is AFTER 2025-09-04 2025-08-10 * "Acme Parts" "INV-9001" ^INV-9001 invoice: "INV-9001" due: "2025-09-09" Expenses:Parts 1200.00 USD Liabilities:AccountsPayable -1200.00 USD 2025-08-20 * "Acme Parts" "Payment INV-9001 (1/3)" ^INV-9001 invoice: "INV-9001" due: "2025-09-09" Liabilities:AccountsPayable 400.00 USD Assets:Bank:Checking -400.00 USD 2025-09-05 * "Acme Parts" "Payment INV-9001 (final)" ^INV-9001 invoice: "INV-9001" due: "2025-09-09" Liabilities:AccountsPayable 800.00 USD Assets:Bank:Checking -800.00 USD ; Unpaid — not yet due as of 2025-09-04 2025-08-15 * "Bright Office Co" "INV-220" ^INV-220 invoice: "INV-220" due: "2025-09-14" Expenses:Office 300.00 USD Liabilities:AccountsPayable -300.00 USD ; Unpaid — due today (as-of == due) 2025-08-20 * "Helix Industries" "INV-440" ^INV-440 invoice: "INV-440" due: "2025-09-04" Expenses:Parts 200.00 USD Liabilities:AccountsPayable -200.00 USD ; Unpaid — 30 days overdue as of 2025-09-04 2025-07-06 * "Metro Hardware" "INV-77" ^INV-77 invoice: "INV-77" due: "2025-08-05" Expenses:Parts 150.00 USD Liabilities:AccountsPayable -150.00 USD ; Overpayment — credit balance (not an amount due; see edge cases) 2025-08-01 * "Credit Vendor" "INV-C1" ^INV-C1 invoice: "INV-C1" due: "2025-08-20" Expenses:Parts 100.00 USD Liabilities:AccountsPayable -100.00 USD 2025-08-18 * "Credit Vendor" "Overpay INV-C1" ^INV-C1 invoice: "INV-C1" due: "2025-08-20" Liabilities:AccountsPayable 150.00 USD Assets:Bank:Checking -150.00 USD ; Missing due metadata — still open; age into a separate bucket, do not drop 2025-08-12 * "No Due Co" "INV-ND" ^INV-ND invoice: "INV-ND" Expenses:Office 50.00 USD Liabilities:AccountsPayable -50.00 USD