B2B Billing and Net Terms
Pathrule2 Rules • 2 Memories • 1 Skill
B2B billing starts before an invoice and continues after it is sent. Customer-specific terms, purchase orders, approval evidence, credit limits, delivery, partial payment, and collections all affect what is collectible and when. This bundle models the receivable lifecycle and ownership across sales, billing, and finance. Unlike Invoicing and Tax, it governs commercial approval, net terms, and accounts receivable rather than invoice evidence and tax calculation.
Suggested path map
Pathrule places each piece on the matching path, so your assistant only sees it where it belongs. This is the scoping you get on import; you can adjust it in your workspace.
Rules
2Net terms come from an approved credit decision/src/billing/accounts-receivablehighstrictCustomer terms, credit limit, currency, legal entity, and approval owner are versioned before an invoice can use them.
| 1 | Net terms extend credit and cannot be accepted from a request field or copied from the last invoice. Resolve them from an approved customer credit record that names the legal entity, billing currency, payment method, term days, credit limit, effective dates, approver, and any purchase-order requirement. |
| 2 | |
| 3 | - Check available credit using open receivables, unapplied cash, pending credits, and approved exceptions before finalization. |
| 4 | - Snapshot the applied terms and approval reference on the invoice so later customer changes do not rewrite history. |
| 5 | - Route limit overrides and term extensions through a named approval path with reason and expiration. |
| 6 | - Block invoice issuance when the customer identity, legal entity, currency, or required purchase order does not match the approval. |
| 7 | |
| 8 | Verification: Change terms after drafting, exceed the limit concurrently, omit a required purchase order, and retry finalization; confirm only one approved snapshot becomes collectible. |
Receivable state changes through posted documents and cash/src/billing/accounts-receivablehighstrictInvoices, payments, credits, write-offs, reversals, and disputes change open balance through immutable allocations.
| 1 | An invoice is not paid because a user toggled a status. Derive receivable state from posted invoice amounts and explicit allocations of payments, credit notes, write-offs, reversals, and disputed amounts. Preserve each allocation with amount, currency, effective time, actor or import source, and linked document. |
| 2 | |
| 3 | - Support partial and overpayments without erasing the remaining or unapplied balance. |
| 4 | - Define deterministic allocation order and require an explicit override when finance chooses another invoice or line. |
| 5 | - Reverse an incorrect allocation with a linked compensating record rather than editing history. |
| 6 | - Calculate open, partially paid, paid, overdue, disputed, written-off, and credit-balance states from the ledger evidence. |
| 7 | |
| 8 | Verification: Apply one payment across invoices, reverse it, add a partial credit, receive an overpayment, and dispute one amount; confirm every open balance is reproducible. |
Memories
2The invoice carries the approved commercial chain/src/billing/invoicesA B2B invoice links the accepted quote or order, purchase order, delivery evidence, legal parties, billing contact, and applied terms.
| 1 | A collectible B2B invoice must be explainable to the buyer's accounts-payable process. Link the accepted quote or contract, internal order, customer purchase order and remaining amount, delivery or acceptance evidence, billing legal entities, remittance instructions, billing contact, tax evidence, and the approved credit-term snapshot. |
| 2 | |
| 3 | Validate purchase-order number format, currency, entity, line limits, and expiration before consuming it, and track cumulative use across invoices. Keep buyer portal and email delivery receipts without treating delivery as acceptance unless the contract says so. See /src/billing/accounts-receivable for the open-balance model and the Invoicing and Tax pattern for immutable document correction. |
Collections is a staged ownership workflow/ops/collectionsAging buckets trigger documented actions, owners, promises, disputes, holds, and escalation rather than untracked reminders.
| 1 | Define aging from the contractual due date and business calendar, not from the latest support message. Each aging band names the action, communication channel, owner, internal escalation, account hold policy, and evidence required before moving forward. A promise to pay, billing dispute, incorrect invoice, or missing purchase order is a case state with an amount and follow-up date, not free-form text. |
| 2 | |
| 3 | Keep customer communications approved and consistent, record delivery, and separate disputed from undisputed balances. Coordinate service restrictions with contract and account policy rather than automatically disabling every overdue customer. See /src/billing/accounts-receivable for authoritative allocations and balances. |
Skills
1review-b2b-receivables/ops/collectionsReview a B2B receivables portfolio for evidence, allocation integrity, aging, disputes, promises, ownership, and credit exposure.
| 1 | --- |
| 2 | name: review-b2b-receivables |
| 3 | description: Review B2B receivables for allocation integrity, aging, disputes, ownership, and credit exposure. |
| 4 | --- |
| 5 | |
| 6 | # Review B2B Receivables |
| 7 | |
| 8 | 1. Freeze the review date and reconcile invoice totals, payments, credits, reversals, write-offs, disputes, and unapplied cash to the receivable ledger. |
| 9 | 2. Inspect aging by customer, legal entity, currency, due date, credit limit, and owner; separate disputed and promised amounts from ordinary overdue balances. |
| 10 | 3. Sample invoices for approved terms, purchase order, acceptance evidence, delivery, contact, and immutable allocation history. |
| 11 | 4. Review limit overrides, term extensions, write-offs, service holds, and manual allocations for approver, reason, amount, and expiration. |
| 12 | 5. Assign every material exception an owner and date, record portfolio totals, and rerun after corrections. |
| 13 | |
| 14 | A successful review leaves no unexplained open balance and no overdue case without an accountable next action. |
Why this pattern
Agents send invoices from unapproved quotes, let customers choose their own due dates, apply partial payments arbitrarily, or treat overdue receivables as support notes.
Built for B2B SaaS, service, and finance teams offering invoicing, purchase-order workflows, and net payment terms.
Keeps your assistant from:
- Issuing credit terms without an approved customer limit and owner
- Losing purchase-order and acceptance evidence behind an invoice
- Partial payments and credits producing unexplained open balances
- License
- Apache-2.0
- Version
- 1.0.0
- Updated
- 2026-08-25