Skip to content

DOM-ACC-PRD-004Accounting Setup

Markdown

DOM-ACC-PRD-004

Accounting Setup

Markdown
  • DocumentDraft
  • ImplementationObserved

Planning

Specified by
CON-ACC-PRD-004

Design

Owned by
SVC-ACC-PRD-products

KindDomain objectProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Relationships

ToCardinalityOwnershipCrosses a serviceOn archive or delete
DOM-ACC-PRD-001zero-or-one-to-oneThe product owns setup lifetime; its deletion cascades to the setup and children.no
DOM-ACC-PRD-002informational: the standard base-currency amount bounds fixed-share validationNeither price nor setup owns the other; setup validation locks their shared product while reading the price.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-ACC-PRD-004-01
A product can own only one setup, which cannot change its product or business unit.
service, databasetest
INV-DOM-ACC-PRD-004-02
Ordinary setup references belong to the product's unit; inter-entity references belong to their named other unit.
service, databasetest
INV-DOM-ACC-PRD-004-03
Service checks reject ordinary account slots whose account category is unsuitable.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses an asset account as the revenue account, naming the slot and the types it takes, and writes no setup
INV-DOM-ACC-PRD-004-04
Sellable-kind validation requires revenue, and deferred-recognition validation requires a deferred revenue account.
servicetest
INV-DOM-ACC-PRD-004-05
New references must be active, but an inactive value already retained in that field remains valid.
servicetest
INV-DOM-ACC-PRD-004-06
Fixed recognition dates cannot repeat and their percentages must total one hundred.
servicetest
INV-DOM-ACC-PRD-004-07
Relative ranges cannot share a transaction month, including across the year boundary.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#REGRESSION — refuses 1-3 beside 11-2, the wrapping last rule overlapping the first, which Rhythm 1.0 accepted
INV-DOM-ACC-PRD-004-08
Setup saving checks share totals and duplicate supplied identities against an available always-period standard base price; later product saving does not revalidate those shares.
serviceobserved
INV-DOM-ACC-PRD-004-09
The setup row and all four child collections share a transaction, so refused replacement retains their prior committed values.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#leaves the previous setup and collections when the database refuses a new row after the old ones were removed
INV-DOM-ACC-PRD-004-10
A referenced account, dimension, merchant account or tax class cannot be deleted while a setup or kind default uses it.
databasetest
INV-DOM-ACC-PRD-004-11
Resolution prefers the setup's tax class, falls back to the workspace kind default, and otherwise returns no class.
service, databasetest
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#lets the product’s own accounting setup class win over the type default
INV-DOM-ACC-PRD-004-12
The workspace-kind key allows one tax default and prevents reassignment to another kind.
service, databaseobserved
INV-DOM-ACC-PRD-004-13
The documented posting boundary keeps posted accounts unchanged by subsequent setup corrections.
documented

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.