Skip to content

CAP-ACC-BAT-014Resolve posting accounts and retain their snapshots

Markdown

CAP-ACC-BAT-014

Resolve posting accounts and retain their snapshots

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

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

Outcomes
Account choices reflect applicable configuration and remain traceable through stored snapshots.
Surfaces
consolejob
Constraints
Products and Books maintain the configuration and policies used by account resolution.
Intent sources
services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-1services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-2services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-3

Controls

16 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-TEN-004 TC-DAT-001 TC-LOG-002 TC-LOG-003 TC-PI-003 TC-PI-005

Business Rules

11 rules, 11 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
Posting resolves accounts rather than issuance, allowing invoices, memos and write-offs to issue before financial configuration exists.
policyservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#issues the invoice and creates the memos and the write-off with no GL account, default or setup anywhere
02must prove
Proposed
Resolution uses the product setup and then unit defaults for the account purpose, with missing-product revenue handled by the unit’s fallback account.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts the invoice to the resolved accounts: the receivable from the unit’s default, the revenue from the product’s setup, the discounted line net of its discount
03must prove
Proposed
If no account resolves, the batch fails without entries and identifies the affected document, line, purpose and relevant configuration choices.
validationservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails the batch’s validation with an error naming the invoice, the missing accounts receivable account, the product’s setup and the unit’s default
04must prove
Proposed
Posting writes account, method and time snapshots to posted lines, and later corrections reuse the original line’s accounting destinations.
invariantservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts the credit memo and the write-off to the accounts the invoice’s entry used, the write-off’s debit to the product’s write-off account
05must prove
Proposed
Later configuration changes preserve existing entries and snapshots and affect the next posting’s resolution.
invariantservicetest
06must prove
Proposed
At posting, the unit’s write-off policy chooses bad-debt expense, the invoice’s original revenue account or an allowance account, with a missing required allowance preventing the batch from posting.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/write-off-policy.integration.spec.js#fails the batch naming the write-off, the allowance purpose and the unit; nothing posts, not even the invoice
07must prove
Proposed
A write-off reversal mirrors that write-off’s recorded entry regardless of subsequent policy changes.
invariantservicetest
services-accounting:modules/batches/tests/integration/services/posting/write-off-policy.integration.spec.js#posts the reversal as the mirror of the write-off’s entry: the write-off expense account credited, the receivable debited
08must prove
Proposed
The current discount method credits revenue net of discount without a separate discount entry and retains gross, discount, net and the discount-product account in the snapshot.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#preserves the discount in the posted snapshot: the gross, the discount and the net on the line, the discount product’s revenue account and the net-of-revenue method
09must prove
Proposed
Tax resolves to the rate’s payable account for the unit or its sales-tax default, failing without either and recording the selected account on the tax line.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#puts the batch in error naming the rate and the unit when neither the rate nor the unit names a tax payable account, writing no entry
10must prove
Proposed
Posting reads current splits, departments and projects rather than retaining their issue-time configuration.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#credits the revenue as the splits stand at posting: 50.00 to the line’s revenue account, 50.00 to the split’s, not the 25% the product had at issue
11must prove
Proposed
Cross-unit product revenue needs the inter-unit receivable and liability account pair, but the examined product provides no configuration writer for that pair.
validationserviceinferred

Scenarios

IdGivenWhenThenProvenance
01A dues invoice issued before accounts were configured.Finance supplies receivable and revenue accounts and posts its batch.The entry uses the configured destinations and retains them on the invoice lines.test
02Three units use different write-off policies for equal amounts.Their batches post and a write-off is later reversed.Each policy selects its own debit destination and the reversal mirrors its original write-off.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.