Skip to content

ATS-ACC-PRD-016Allocate product revenue across dates and accounts: Capability Test Specification

Markdown

ATS-ACC-PRD-016

Allocate product revenue across dates and accounts: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule gap: FND-ACC-PRD-065
  • Transition gap: FND-ACC-PRD-065
  • Validation covered
  • Permission gap: FND-ACC-PRD-065
  • Edge covered
  • Failure gap: FND-ACC-PRD-065
  • Boundary covered
  • Concurrency gap: FND-ACC-PRD-065
  • Invariant covered
  • Interaction covered

Test Scenarios

9 scenarios proving CAP-ACC-PRD-016; 7 bound to an existing test.

01 Deferral requires its liability accountvalidationapinegativetest
Proves
BR-CAP-ACC-PRD-016-01
Preconditions
A product can defer revenue.
Steps
Choose deferred treatment without its deferred revenue account.
Expected
The setup save fails.
Data
A product can defer revenue.
Bound to
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to deferral without a deferred revenue GL account
Source
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to deferral without a deferred revenue GL account
02 Fixed allocation must be complete and uniqueboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-016-02 INV-DOM-ACC-PRD-004-06
Preconditions
A setup uses fixed-date recognition.
Steps
Try missing dates, incorrect totals, duplicate dates and exact fractional totals.
Expected
Invalid configurations fail and exact distinct allocation succeeds.
Data
A setup uses fixed-date recognition.
Bound to
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses percentages that add up to less than 100, in Rhythm 1.0’s words
03 Month coverage includes the year boundaryedgeunitnegativetest
Proves
BR-CAP-ACC-PRD-016-03 INV-DOM-ACC-PRD-004-07
Preconditions
A setup uses relative recognition.
Steps
Try missing rules, shared months, year-end overlaps and disjoint wrapping ranges.
Expected
Invalid coverage fails and disjoint ranges are retained in starting-month order.
Data
A setup uses relative recognition.
Bound to
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
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a range wrapping the year end overlapping the next, in Rhythm 1.0’s multi-year words
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#accepts disjoint ranges, one wrapping the year end, and stores them by start month
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to relative rules overlapping across the year end
Source
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 Split kinds exclude the other value formvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-016-05
Preconditions
A setup can take revenue splits.
Steps
Supply both value forms for percentage and fixed splits.
Expected
Both configurations fail.
Data
A setup can take revenue splits.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a fixed amount split that states a percentage
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a percentage split that also states an amount
05 Split totals honor percentage and price limitsboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-016-06
Preconditions
The product’s standard price is 5000 minor units.
Steps
Try percentages of 101 and 100 and fixed totals of 5001 and 5000.
Expected
Over-limit totals fail and exact limits succeed.
Data
The product’s standard price is 5000 minor units.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses fixed amounts above the product’s price, which Rhythm 1.0 summed as NaN and passed
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to fixed revenue splits above the product’s price
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses fixed amounts adding up to more than the standard base price
06 Split identities remain distinctinvariantunitnegativetest
Proves
BR-CAP-ACC-PRD-016-07
Preconditions
A saved setup contains revenue splits.
Steps
Resend an existing identity, provide a new identity and duplicate one identity.
Expected
Supplied unique identities remain and duplicates fail.
Data
A saved setup contains revenue splits.
Bound to
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#replaces the splits as a whole, keeping the id sent back
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#keeps the id of a split sent back
07 Inter-entity accounts belong to the other unitvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-016-08
Preconditions
Three units provide account fixtures.
Steps
Try own-unit, repeated-unit, missing-unit and wrongly scoped account entries, then a valid entry.
Expected
Invalid relationships fail and the valid other-unit entry succeeds.
Data
Three units provide account fixtures.
Bound to
services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to an inter-entity entry naming the product’s own unit
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a liability account of a third unit
08 Setup child collections reach their separate limitsboundaryapinegativeproposed
Proves
BR-CAP-ACC-PRD-016-09
Preconditions
A valid setup has eligible accounts and distinct other-unit fixtures.
Steps
Save fifty revenue splits and two hundred inter-entity entries, then exceed each limit separately.
Expected
Each maximum saves successfully; either excessive collection refuses the replacement without changing the setup.
Data
A valid setup has eligible accounts and distinct other-unit fixtures.
Source
services-accounting:modules/products/services/persistence/product-accounting-setups.ts:replaceProductAccounting
09 A lower price affects the next revenue-share saveinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-016-06 BR-CAP-ACC-PRD-008-12 BR-CAP-ACC-PRD-011-06 INV-DOM-ACC-PRD-004-08
Preconditions
A bundle has a standard price and existing fixed shares.
Steps
Lower the grid price with compatible component totals, inspect the existing shares, then resubmit those shares as a setup replacement.
Expected
The product edit does not rewrite the setup; the later setup replacement rejects shares above its new price limit.
Data
A bundle has a standard price and existing fixed shares.
Source
services-accounting:modules/products/services/rules/product-rules.ts:listPrice; services-accounting:modules/products/services/rules/product-rules.ts:revenueSplitsProblem; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses more than 500 prices (the bound of the grid); services-accounting:modules/products/services/rules/product-rules.ts:listPrice; services-accounting:modules/products/services/rules/product-rules.ts:bundleTotalsProblem

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.