Skip to content

CAP-ACC-PRD-016Allocate product revenue across dates and accounts

Markdown

CAP-ACC-PRD-016

Allocate product revenue across dates and accounts

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleProductsRevision4

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
Revenue allocation retains valid dates, shares and account references.
Surfaces
consoleapi
Intent sources
services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D3

Controls

21 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
accounting.product-accounting.updateapitenant

Business Rules

10 rules, 8 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
Revenue treatment selects immediate, automatic, relative-date or fixed-date recognition, with deferred treatment requiring a capable kind and deferred revenue account.
validationservice, databasetest
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to deferral without a deferred revenue GL account
02must prove
Proposed
Fixed-date treatment requires up to one hundred twenty distinct dates whose percentages sum to exactly one hundred.
✓ Allocations of 40.5 percent and 59.5 percent complete the required hundred percent.✗ Three allocations of 33.33 percent fall short at 99.99 percent and fail validation.
calculationservicetest
03must prove
Proposed
Relative-date treatment requires up to twelve inclusive transaction-month ranges with no shared month, permits ranges crossing December and stores them by starting month.
validationservicetest
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
04
Proposed
Relative-date fallback configuration selects immediate recognition or default deferral for transactions outside configured ranges.
policydatabaseobserved
05must prove
Proposed
Each revenue split names an income account in the product’s unit and supplies either a percentage or fixed amount.
validationservice, databasetest
06must prove
Proposed
Percentage shares total at most one hundred; fixed shares fit the standard set base price from the always period when available, preferring undated then first matching dated rows.
calculationserviceobserved
07must prove
Proposed
Revenue split identities are retained when supplied and generated when absent, with repeated identities rejected.
invariantservicetest
08must prove
Proposed
Inter-entity entries appear once per other unit, exclude the product’s unit and name accounts belonging to that other unit.
validationservice, databasetest
09must prove
Proposed
Accounting setup accepts no more than fifty revenue splits and two hundred inter-entity entries.
validationapi, serviceobserved
10
Proposed
The console rejects transaction-month ranges crossing December and omits split identities from saves, causing identities to be generated again.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01A priced course awaits accounting setup.Finance configures three dates totaling one hundred percent, a split and another unit’s accounts.All three collections read back from the saved setup.test

Edge Cases

IdGivenWhenThenProvenance
02Relative coverage includes January–March and November–February.Finance attempts to save those ranges.Shared January and February coverage rejects the setup.test
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

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.