Skip to content

ATS-ACC-BKS-004Maintain dated exchange rates for a unit: Capability Test Specification

Markdown

ATS-ACC-BKS-004

Maintain dated exchange rates for a unit: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBooks, Business Units and Chart of AccountsRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-ACC-BKS-004; 6 bound to an existing test.

01 Store precise eligible ratesvalidationapinegativetest
Proves
BR-CAP-ACC-BKS-004-01
Preconditions
CAD is supported by the unit.
Steps
Submit decimal text, numeric input, zero, eleven fractional places, a base-currency quote and an unsupported currency.
Expected
Only eligible positive decimal text is stored at the declared precision.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/unit/rules/exchange-rate-rules.spec.js#refuses a number (digits would be lost), zero, a negative, more than ten places, nine integer digits and a word
02 Preserve dated rate identityinvariantapinegativetest
Proves
BR-CAP-ACC-BKS-004-02 INV-DOM-ACC-BKS-001-05
Preconditions
A manual CAD quote exists for a date.
Steps
Duplicate that date and change the existing quote’s date, currency and source.
Expected
Every request is refused and the original quote remains.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.integration.spec.js#refuses a second rate for the currency on the same day
03 Resolve quotes consistentlyruleapitest
Proves
BR-CAP-ACC-BKS-004-03
Preconditions
Two dated CAD quotes exist and a provider-configured EUR has none.
Steps
Resolve on, between and before quote dates, then compare the database function and EUR result.
Expected
The latest eligible quote and policies agree; earlier and unquoted results carry no rate.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.queries.integration.spec.js#answers the latest rate on or before the day with the currency’s settings
04 Fill missing provider quotesruleapitest
Proves
BR-CAP-ACC-BKS-004-05
Preconditions
Provider currencies include an existing quote and a stubbed partially available response.
Steps
Request filling for the date.
Expected
One provider call saves only missing quotes on provider dates and reports skipped and unpriced currencies.
Data
Isolated fixture records matching this scenario’s setup.
Bound to
Source
services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.integration.spec.js#asks the provider once for every provider-sourced currency, with the unit, its base and the day, and writes provider rows with the platform’s ids
05 Leave configuration intact after fill refusalfailureapinegativetest
Proves
BR-CAP-ACC-BKS-004-06
Preconditions
Cases include manual sourcing, no provider currency, provider unavailability and provider decline.
Steps
Request filling in each case.
Expected
Each refusal leaves rates unchanged.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.integration.spec.js#refuses a currency that takes its rates from the table, one the unit is not enabled for, and a unit with no provider currency
06 Round conversion at currency precisionboundaryunittest
Proves
BR-CAP-ACC-BKS-004-07
Preconditions
Quotes cover yen conversion and a credit amount.
Steps
Convert amounts and compute a reciprocal.
Expected
Minor-unit results use half-away-from-zero rounding; the reciprocal uses half-up ten-place rounding.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/unit/rules/exchange-rate-rules.spec.js#applies the target currency’s exponent exactly: 100.00 USD at 149.37 is 14937 yen
07 Correct provider quotes through replacement fillingtransitionapinegativeproposed
Proves
BR-CAP-ACC-BKS-004-04
Preconditions
A provider quote has been stored.
Steps
Try manual replacement and then deletion.
Expected
Replacement returns a provider-rate conflict; deletion succeeds.
Data
Isolated fixture records matching this scenario’s setup.
Source
services-accounting:modules/books/services/persistence/exchange-rates.ts:updateExchangeRate
08 Exercise the grants for maintain dated exchange rates for a unitpermissionapinegativeproposed
Proves
BR-CAP-ACC-BKS-016-01
Preconditions
An application-authorized reader and administrator share the run-owned setup. A third principal lacks the relevant resource grant.
Steps
Read the relevant configuration as the reader, attempt each supported mutation, then repeat with the matching administrator grants. Repeat the reads without their resource grants.
Expected
The permission outcomes match the cited authorization rule, and refused mutations leave every configured value unchanged.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/e2e/configuration-security.e2e.spec.js#is refused the create 403 permission_missing
09 Quote precision endpointsboundaryapinegativeproposed
Proves
BR-CAP-ACC-BKS-004-01
Preconditions
An isolated workspace has records needed for both eligible and ineligible examples.
Steps
Create quotes with eight integer and ten fractional digits, then increase each length by one.
Expected
Only the eligible precision saves and reads back without losing a digit.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/unit/rules/exchange-rate-rules.spec.js#refuses a number (digits would be lost), zero, a negative, more than ten places, nine integer digits and a word
10 Refuse the second replacement of a shared read versionconcurrencyapinegativeproposed
Proves
BR-CAP-ACC-BKS-016-05
Preconditions
Two administrators read the same version of the relevant mutable record. Each prepares a different otherwise valid replacement.
Steps
Release both replacement requests from a barrier. Read the record again and retry the losing payload at its original version.
Expected
One replacement commits, the other is stale, and repeating the stale request preserves the winning values.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/e2e/payment-terms.e2e.spec.js#answers 400 naming is_active to a replacement that leaves it out
11 Unit replacement retains dated quote eligibilityinteractionapiproposed
Proves
BR-CAP-ACC-BKS-001-05 BR-CAP-ACC-BKS-004-03
Preconditions
Run-owned records satisfy the preconditions of the referenced capability proofs.
Steps
Save a quote and edit the unit description while omitting its supported-set extension, then resolve the quote.
Expected
The stored quote and currency settings still resolve after the ordinary edit.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#keeps the supported currencies when the replacement does not state them,services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.queries.integration.spec.js#answers the latest rate on or before the day with the currency’s settings

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.