Skip to content

DOM-ACC-PRD-002Price

Markdown

DOM-ACC-PRD-002

Price

Markdown
  • DocumentDraft
  • ImplementationObserved

Planning

Specified by
CON-ACC-PRD-002

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-001many-to-one (up to 500 cells per product)The product owns all cells and replaces or removes them as part of product persistence.no
DOM-ACC-PRD-004informational: setup fixed-share validation consults the standard base-currency amountBoth records belong to the same product, whose lock serializes their local writes.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-ACC-PRD-002-01
Saving a fixed-price product requires a set standard cell in its unit's base currency.
service, consoletest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses an Accounting Product without a standard price in the base currency
INV-DOM-ACC-PRD-002-02
A giver-priced kind refuses all stored price cells.
service, consoletest
INV-DOM-ACC-PRD-002-03
A stored price uses a currency enabled for its owning product's unit.
service, databasetest
services-accounting:modules/products/tests/integration/db/products.table.integration.spec.js#refuses a currency the product’s business unit is not enabled for
INV-DOM-ACC-PRD-002-04
Validation admits only values appropriate to the cell mode and rejects conversion and prohibition in the base currency.
api, serviceobserved
INV-DOM-ACC-PRD-002-05
A percentage cell cannot target standard and requires a set standard cell in the same currency and matching or always period.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a percentage cell on the standard audience, and one with no standard price to be a percentage of
INV-DOM-ACC-PRD-002-06
Saving refuses overlapping windows among cells with the same audience, currency and period.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses two cells of one audience, currency and period applying at once, and accepts the same window in another period
INV-DOM-ACC-PRD-002-07
HTTP audience checks always admit standard and member; other choices must be active in the workspace register when present, or already held when the register is absent.
servicetest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#admits an audience the product already holds on a replacement (a migrated special price), even without the vocabulary
INV-DOM-ACC-PRD-002-08
HTTP saving replaces the complete grid and accepts at most 500 cells.
api, servicetest
INV-DOM-ACC-PRD-002-09
Set amounts cannot be negative or fractional minor units.
api, databasetest
INV-DOM-ACC-PRD-002-10
Each former special price becomes a local-audience cell and handover in the migration, and product deletion removes its handover by cascade.
databasetest
services-accounting:modules/products/tests/integration/db/special-prices-a12-migration.integration.spec.js#hands each special price over as a product-local audience: minted id, product, name, criteria, amount in the base currency, formula, rank

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.