Skip to content

CAP-ACC-BAT-015Produce document entries using the applicable accounting method

Markdown

CAP-ACC-BAT-015

Produce document entries using the applicable accounting method

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Produce document entries using the applicable accounting method ​

Purpose ​

Posting translates eligible financial documents into the entries appropriate to the unit’s accounting method.

How It Works ​

The engine reads each batch’s eligible documents and the accounting context they need. Document-specific rules build their debit and credit legs. The accounting method determines when an invoice or payment contributes revenue. Related documents establish dependencies on other batches. Stored exchange information supplies conversion for foreign-currency work. Missing prerequisites fail the affected batch, and the generated lines retain source references for review.

Relationships ​

  • Prerequisite: Resolve posting accounts and retain their snapshots, which addresses the connected batch work.
  • Related outcome: Run and monitor a batch posting job, which addresses the connected batch work.
  • Related outcome: Protect ledger balance, immutability and workspace isolation, which addresses the connected batch work.
  • Related outcome: Plan deferred revenue and adjust its remaining releases, which addresses the connected batch work.

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Applicable documents produce balanced, attributable account movements or generation reasons.
Surfaces
job
Constraints
The carried earlier-product suites provide regression evidence for the native posting rules.
Intent sources
services-accounting:docs/milestones/ACCT-M3-batch-posting-and-ledger.md#Status history (2026-10-21 09:36, Andrew ruled the credit memo on a partly recognised line splits by schedule)

Controls

14 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-005 TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-LOG-002 TC-LOG-003 TC-LOG-005 TC-PI-005

Business Rules

14 rules, 14 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The accounting method determines eligible live-document entries, excluding void documents, memos of void invoices and cash-basis invoice entries.
calculationservicetest
02must prove
Proposed
The entry uses its batch’s date and fiscal period and separately retains the source document date.
calculationservicetest
03must prove
Proposed
Accrual invoice entries debit tax-inclusive receivables, credit net revenue or deferred revenue and credit each recorded tax to its payable account.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts the invoice per line: the receivable debited the total with the tax, revenue credited the net, and a tax credit per tax line to its account
04must prove
Proposed
Credit memos reverse receivable and revenue or deferred revenue, debit memos add those legs, and write-offs debit their resolved expense or allowance against receivable.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#posts the credit memo against the invoice line it reduces: the receivable credited, the revenue debited
05must prove
Proposed
Corrections to partly recognised deferred lines divide their amount between recognised revenue and the schedule’s remaining deferred share.
origin: services-accounting:docs/milestones/ACCT-M3-batch-posting-and-ledger.md#Status history (2026-10-21 09:36, Andrew ruled the credit memo on a partly recognised line splits by schedule)
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/memo-split-by-schedule.integration.spec.js#posts the credit memo of 60.00 as Cr receivable 6000, Dr deferred revenue 3000 and Dr revenue 3000
06must prove
Proposed
Payment entries debit bank or merchant cash, credit allocated line receivables and place the unapplied remainder in unapplied cash, retaining any paid order reference.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts the payment: cash debited its total, the invoice line's receivable credited the allocation, unapplied cash credited the rest
07must prove
Proposed
An allocation made after the payment posts creates its own batched entry from unapplied cash to receivable and identifies its payment.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts the row as a payment allocation: unapplied cash debited, the line's receivable (the gala line's, the unit's default) credited, naming its payment
08must prove
Proposed
Manual credits move expense to liability, payment-derived credits move unapplied cash to store-credit liability, applications move liability to receivable and reversals mirror those entries.
calculationservicetest
services-accounting:modules/batches/tests/unit/rules/credit-application-entry-rules.spec.js#debits the credit liability for the total and credits each invoice line’s receivable, in one entry naming the application
09must prove
Proposed
Refunds and bounced payments credit cash against unapplied cash or credit liability, and reversed allocations restore receivable.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts the bounced check as the money leaving: the bank account credited its total, unapplied cash debited
10must prove
Proposed
A document depending on another unposted batch errors unless the batches post together, and posting records its downstream dependency on the source batch.
policyservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses November alone while October is open: November in error, naming the memo's invoice and October's status
11must prove
Proposed
Foreign-currency documents use their stored rate and place rounding residue on the last line to balance both currencies, with missing rates failing the batch.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/foreign-currency-invoice.integration.spec.js#marks the batch in error with the same sentence when posted, and writes no entry
12must prove
Proposed
Cash-basis invoices produce no entry, and allocated payment revenue uses the paid line’s revenue account instead of receivable.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts nothing for the invoice, and the payment as cash against the revenue of the line it pays (the frozen account), no receivable
13must prove
Proposed
Reconciliation requests become individual entries with cash legs for bank and clearing accounts and distinct fee, reserve, adjustment and write-off line types, keeping a requests-only batch nonempty.
calculationservicetest
services-accounting:modules/batches/tests/unit/rules/reconciliation-entry-rules.spec.js#posts a bank line and a clearing line as cash lines naming their accounts, debits and credits as stored
14must prove
Proposed
Generated entries balance in base and transaction currencies and retain document-line references for their source transactions.
invariantservice, databasetest

Scenarios

IdGivenWhenThenProvenance
01An accrual batch holds an invoice, a credit memo and a write-off together.Staff post that batch.The invoice creates receivable and revenue, the memo reduces both and the write-off clears the remaining receivable against expense.documented
02A September invoice is collected in an October batch.The batch posts.The entry uses October’s date and period and retains September as its document date.test
03A payment relies on an invoice in another unposted batch.Staff post the payment alone and later post both batches together.The isolated payment errors on the dependency, while the combined request can post both.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.