Skip to content

ATS-ACC-PRD-008Configure prices by audience, period and currency: Capability Test Specification

Markdown

ATS-ACC-PRD-008

Configure prices by audience, period and currency: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-ACC-PRD-008; 9 bound to an existing test.

01 Kind-specific pricing rejects missing or forbidden rowsruleunitnegativetest
Proves
BR-CAP-ACC-PRD-008-01 BR-CAP-ACC-PRD-008-02 INV-DOM-ACC-PRD-002-01 INV-DOM-ACC-PRD-002-02
Preconditions
A US-dollar unit supports Accounting, Legacy and Donation fixtures.
Steps
Create fixed-priced products without standard base prices and a donation with prices.
Expected
Each invalid configuration fails.
Data
A US-dollar unit supports Accounting, Legacy and Donation fixtures.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses an Accounting Product without a standard price in the base currency
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses an Accounting Product without a standard price in the base currency
02 Unit currency settings restrict pricingvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-008-03
Preconditions
Two units support euros but only one enables multicurrency.
Steps
Try Canadian-dollar pricing and euro pricing in each unit.
Expected
Unsupported currency fails and euros succeed only when multicurrency is enabled.
Data
Two units support euros but only one enables multicurrency.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a supported currency when the unit has Enable Multicurrency off (1.0: off is a single-currency unit)
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a currency that is neither the business unit’s base nor one of its supported currencies
Source
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a supported currency when the unit has Enable Multicurrency off (1.0: off is a single-currency unit)
03 Price modes require matching valuesvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-008-04
Preconditions
A multicurrency unit supports grid fixtures.
Steps
Submit missing amounts, misplaced percentages, invalid percentages and conversion with an amount.
Expected
Every inconsistent cell fails.
Data
A multicurrency unit supports grid fixtures.
Bound to
services-accounting:modules/products/tests/integration/db/products.table.integration.spec.js#refuses a percent_of_standard row without its percent, and a set row with one
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a percentage cell without a percent, and a set cell with one
04 The base currency cannot be converted or prohibitedvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-008-05
Preconditions
A unit enables a foreign currency.
Steps
Try conversion and prohibition in base currency and prohibition in the foreign currency.
Expected
Base-currency choices fail and foreign prohibition succeeds.
Data
A unit enables a foreign currency.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a standard price in the base currency and a prohibited supported currency
Source
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses prohibiting the base currency
05 Percentage backing stays in the right periodruleunitnegativetest
Proves
BR-CAP-ACC-PRD-008-06 BR-CAP-ACC-PRD-008-08 INV-DOM-ACC-PRD-002-05
Preconditions
The grid has currencies and named periods.
Steps
Try percentage on standard, missing currency backing, always backing and backing only from a different period.
Expected
Only valid same-period or always backing succeeds.
Data
The grid has currencies and named periods.
Bound to
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
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#lets a period cell inherit the always cell of its audience (a percentage in a period needs a standard price in that period or always)
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a percentage cell backed by the standard price of its currency, in its period or always (A12)
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a percentage cell whose period has no standard price and no always row to inherit
Source
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
06 Conversion uses the same audienceruleunitnegativetest
Proves
BR-CAP-ACC-PRD-008-07
Preconditions
A member euro conversion row is proposed.
Steps
Supply only standard dollars, then supply member dollars.
Expected
The first grid fails and the second succeeds.
Data
A member euro conversion row is proposed.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a calculated cell in the base currency, and one whose audience has no base-currency price to convert
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a calculated cell backed by its audience’s base-currency price, and refuses one in the base currency (A13)
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a calculated cell in the base currency, and one whose audience has no base-currency price to convert
07 Applicability windows cannot overlapboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-008-09
Preconditions
A unit supports dated grid fixtures.
Steps
Try overlaps, an undated row with a dated row, meeting windows and separate periods or audiences.
Expected
Overlaps fail while exclusive-end boundaries and distinct cell coordinates succeed.
Data
A unit supports dated grid fixtures.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a dated price beside one that applies always, in the same audience and currency
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#accepts two periods of one audience and currency that meet without overlapping
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#judges overlap per period: the same window in two periods never meets
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 400 to overlapping price periods, leaving the prices as they were
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a dated price beside one that applies always, in the same audience and currency
08 Audience admission follows vocabulary availabilityedgeunitnegativetest
Proves
BR-CAP-ACC-PRD-008-10
Preconditions
Commerce vocabulary is absent then present with active, inactive and foreign-workspace audiences.
Steps
Save grids for built-ins, held audiences and vocabulary audiences.
Expected
Admission follows the recorded rules in each vocabulary state.
Data
Commerce vocabulary is absent then present with active, inactive and foreign-workspace audiences.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses an audience the vocabulary does not know while Commerce’s pricing audiences do not exist (the built-ins are admitted)
Source
services-accounting:modules/products/tests/integration/services/persistence/pricing-audiences.integration.spec.js#refuses an inactive audience and an unknown one, naming the vocabulary
09 Grid replacement respects the collection limitboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-008-12 INV-DOM-ACC-PRD-002-08
Preconditions
A product is available for pricing.
Steps
Submit 501 rows and then replace a smaller valid grid.
Expected
The excessive grid fails and valid replacement removes previous rows.
Data
A product is available for pricing.
Bound to
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#replaces the prices as a whole, with their effective periods
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses more than 500 prices (the bound of the grid)
10 Storage rejects negative and fractional price moneyinvariantapinegativeproposed
Proves
BR-CAP-ACC-PRD-008-11 INV-DOM-ACC-PRD-002-09
Preconditions
A fixed-priced product has an otherwise valid base-currency grid.
Steps
Attempt storage writes with negative and fractional minor-unit amounts.
Expected
Both writes are refused and the committed grid remains unchanged.
Data
A fixed-priced product has an otherwise valid base-currency grid.
Source
services-accounting:modules/products/db/product-prices.table.ts; services-accounting:modules/products/tests/integration/db/products.table.integration.spec.js#refuses a negative amount
11 Price changes affect later component and revenue-allocation validationinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-008-01 BR-CAP-ACC-PRD-009-05 BR-CAP-ACC-PRD-011-06 BR-CAP-ACC-PRD-016-06
Preconditions
A product holds migrated audience rows, components and fixed revenue shares.
Steps
Resubmit after Commerce vocabulary activation; once the audience is admitted, lower the standard price and attempt component and setup allocations above that price.
Expected
Audience admission gates the edit; subsequent component and setup saves use the new applicable price, without claiming automatic revalidation of existing shares.
Data
A product holds migrated audience rows, components and fixed revenue shares.
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses an Accounting Product without a standard price in the base currency; services-accounting:modules/products/tests/integration/services/persistence/pricing-audiences.integration.spec.js#answers the built-ins and the tenant’s active audiences among the ids asked: not an inactive one, not another tenant’s, not the ids held; services-accounting:modules/products/services/rules/product-rules.ts:listPrice; services-accounting:modules/products/services/rules/product-rules.ts:bundleTotalsProblem; services-accounting:modules/products/services/rules/product-rules.ts:listPrice; services-accounting:modules/products/services/rules/product-rules.ts:revenueSplitsProblem

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.