feat: payout gross-up (books.record_payout)
A platform deposit becomes a draft entry with the deposit, fees, adjustments, and gross revenue (by class), refused unless gross - fees +/- adjustments equals the deposit to the cent. The payout statement is attached as its receipt before posting. 60 tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MtYEaR6M6Ybdhm6X98BWNu
This commit is contained in:
11 files changed
+640
-2
No files matched your search
@@ -162,6 +162,20 @@ through the policy.
|
||||
- `books.run_recurring { through? }` → `{ drafts: [{ recurring_id, date,
|
||||
entry_id }] }`: one draft per occurrence on or before `through`, once.
|
||||
|
||||
## Tools — payouts
|
||||
|
||||
- `books.record_payout { date, description, deposit_account, deposit,
|
||||
revenue: [{ account, amount, class? }], fees?: [{ account, amount,
|
||||
class? }], adjustments?: [{ account, side, amount, class? }] }` →
|
||||
`{ entry_id, status: "draft", gross, fees, adjustments, deposit, lines,
|
||||
next }`. Builds the grossed-up entry — Dr deposit (net; Cr when negative),
|
||||
Dr fees, Dr/Cr adjustments (a debit reduces the deposit: refunds,
|
||||
chargebacks, reserves held, tax withheld), Cr revenue (gross; revenue or
|
||||
liability accounts, e.g. deferred revenue or sales tax collected) — and
|
||||
refuses unless gross − fees ± adjustments equals the deposit to the cent,
|
||||
naming the difference. A draft: attach the payout statement, preview,
|
||||
post. Platform-agnostic; format-specific statement parsers can feed it.
|
||||
|
||||
## Tools — receipts & documents
|
||||
|
||||
- `books.attach_receipt { entry_id?, file_name, mime_type, content_base64 }`
|
||||
|
||||
@@ -42,6 +42,7 @@ No other statuses.
|
||||
| CPA handoff package (TB + GL xlsx, P&L + BS pdf, zip) | Reports → export | done | — |
|
||||
| Budgets | Budgets | todo | R-FUTURE-6 (declined as bloat) |
|
||||
| Scheduled transactions (recurring entries → drafts) | Scheduled txns / Recurring transactions | partial | hand-verified fixture incl. month-end dates; drafts only, by design |
|
||||
| Payout gross-up (deposit → revenue, fees, adjustments) | Bank deposit with fee lines; Xero/QBO Stripe & Shopify integrations | partial | hand-verified fixture incl. classes and a negative payout; no statement parsers yet |
|
||||
| Prepaid expense + deferred revenue amortization | Amortization schedules (Xero/QBO add-ons) | partial | hand-verified fixture, to the cent; no golden file yet |
|
||||
| Automated GnuCash diff harness | — (our `xtask oracle`) | todo | roadmap phase 3 |
|
||||
|
||||
|
||||
@@ -140,6 +140,9 @@ requirement conflict, the requirement wins.
|
||||
the journal records each posting with its full entry and replay checks
|
||||
it. Recurring entries generate drafts only, never posts, so the receipt
|
||||
policy always applies.
|
||||
- **R-? — Payout gross-up.** Platform deposits are recorded gross:
|
||||
revenue, fees, and adjustments, reconciled to the deposit to the cent,
|
||||
as a draft that carries the payout statement as its receipt.
|
||||
- **R-? — A/R and A/P workflows.** Was R-FUTURE-5.
|
||||
`ledger-core::arap`: customers, vendors, invoices, bills, payments,
|
||||
AR/AP aging. MCP tools for the full workflow.
|
||||
|
||||
Reference in new issue
Block a user