Skip to content

ATS-ACC-TRX-014Unwind billed purchases and their collected value: Capability Test Specification

Markdown

ATS-ACC-TRX-014

Unwind billed purchases and their collected value: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleTransactionsRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-ACC-TRX-014; 8 bound to an existing test.

01 Invalid reversal targets preserve billingvalidationapinegativetest
Proves
BR-CAP-ACC-TRX-014-01
Preconditions
Draft and issued invoices are available.
Steps
[ { "do": "Reverse a draft, an unrelated line and excessive remaining value.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a draft invoice (invoice_not_draft), a line of another invoice (invoice_mismatch) and more than a line has left (over_application)" } ]
Expected
Each ineligible request fails.
Data
Invoices with identifiable line ownership.
Bound to
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a draft invoice (invoice_not_draft), a line of another invoice (invoice_mismatch) and more than a line has left (over_application)
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a draft invoice (invoice_not_draft), a line of another invoice (invoice_mismatch) and more than a line has left (over_application)
02 Cancellation fee uses released receipt valueinteractionapitest
Proves
BR-CAP-ACC-TRX-014-02 BR-CAP-ACC-TRX-014-03
Preconditions
A check paid 60.00 on dues.
Steps
[ { "do": "Reverse 40.00 with a 5.00 fee and refund treatment.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05)" } ]
Expected
The memo frees 40.00, receipt-backed credit settles the fee and 35.00 awaits staff refund.
Data
A cancellation-fee product.
Bound to
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05)
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it issued the fee invoice of 500 and settled it with a credit of 500 made from the check’s freed money
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it requested the remainder of 3500 as a refund of the check for the staff to pay; the check holds it unapplied until then
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05)
03 Remainder returns to each contributing receiptinteractionapitest
Proves
BR-CAP-ACC-TRX-014-04
Preconditions
Two receipts paid 70.00 and 30.00, and another bill used one check.
Steps
[ { "do": "Reverse the first with refunds and the second with credit.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js#it requests one refund per payment, 7000 and 3000, each from its own payment" } ]
Expected
Separate source-specific refunds return each share; credit treatment skips fee and refund work when absent.
Data
Two-receipt and single-receipt examples.
Bound to
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it completes with a remainder credit of 1000 from the check, the fee and refund steps skipped
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js#it requests one refund per payment, 7000 and 3000, each from its own payment
04 Reversal refusal and replay retain one resultfailureapinegativetest
Proves
BR-CAP-ACC-TRX-014-05 INV-DOM-ACC-TRX-001-18
Preconditions
The date lacks an open period and another reversal already completed.
Steps
[ { "do": "Submit the invalid date and replay the completed request.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a reversal dated in no open period (period_not_open), writing nothing" } ]
Expected
The invalid request writes nothing and replay adds no records.
Data
An eligible and ineligible fiscal date.
Bound to
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a reversal dated in no open period (period_not_open), writing nothing
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a reversal dated in no open period (period_not_open), writing nothing
05 Preview distinguishes processor and staff returnsboundaryapitest
Proves
BR-CAP-ACC-TRX-014-06
Preconditions
The bill was paid partly by check and card.
Steps
[ { "do": "Preview fee-bearing and full reversal cases.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it answers the figures of reversing 2000 more of the dues line with a fee of 300 and writes nothing" } ]
Expected
No financial records remain; results identify 40.00 processor and 60.00 staff responsibility.
Data
Two contributing receipts.
Bound to
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it answers the figures of reversing 2000 more of the dues line with a fee of 300 and writes nothing
services-accounting:modules/transactions/tests/integration/services/reversals/reversal-check-and-card.integration.spec.js#it previews the refund by who pays it: 4000 through the processor and 6000 for staff
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it answers the figures of reversing 2000 more of the dues line with a fee of 300 and writes nothing
06 Refund outcome determines reversal completiontransitionapitest
Proves
BR-CAP-ACC-TRX-014-07
Preconditions
Processor scripts offer pending and declined refunds.
Steps
[ { "do": "Reverse, confirm the pending return by signed event and run the declined case.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it turns succeeded and completed when the signed event settles the refund" } ]
Expected
Booked adjustments persist while pending; success completes normally and decline completes with exception.
Data
Gateway confirmation and decline fixtures.
Bound to
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it turns succeeded and completed when the signed event settles the refund
07 Billing reversal frees its fee shareruleapitest
Proves
BR-CAP-ACC-TRX-014-08
Preconditions
A 100.00 card tender paid fee-bearing billing.
Steps
[ { "do": "Reverse 40.00 of billed value.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it credits the fee’s share of the reversed money off the fee invoice and frees it with the rest: 4000 of 10000 reversed frees 4112" } ]
Expected
Released value totals 41.12 and the corresponding fee share is credited.
Data
The matching card-fee calculation rule.
Bound to
services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it credits the fee’s share of the reversed money off the fee invoice and frees it with the rest: 4000 of 10000 reversed frees 4112
Source
services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it credits the fee’s share of the reversed money off the fee invoice and frees it with the rest: 4000 of 10000 reversed frees 4112
08 Preview authority is separate from creationpermissionapinegativetest
Proves
BR-CAP-ACC-TRX-014-09
Preconditions
The caller lacks reversal authorities.
Steps
[ { "do": "Attempt creation, preview and inspection.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/e2e/settlements.e2e.spec.js#it is refused the reversal routes without accounting.reversals.create, .preview and .read (403)" } ]
Expected
All operations deny access.
Data
An incomplete-authority identity.
Bound to
services-accounting:modules/transactions/tests/e2e/settlements.e2e.spec.js#it is refused the reversal routes without accounting.reversals.create, .preview and .read (403)
Source
services-accounting:modules/transactions/tests/e2e/settlements.e2e.spec.js#it is refused the reversal routes without accounting.reversals.create, .preview and .read (403)
09 Service cancellation retains each financial componentinteractionapiproposed
Proves
BR-CAP-ACC-TRX-014-02 BR-CAP-ACC-TRX-014-03 BR-CAP-ACC-TRX-014-04 BR-CAP-ACC-TRX-014-05 BR-CAP-ACC-TRX-003-04 BR-CAP-ACC-TRX-011-02 BR-CAP-ACC-TRX-011-04 BR-CAP-ACC-TRX-012-03 BR-CAP-ACC-TRX-012-09 BR-CAP-ACC-TRX-020-01 BR-CAP-ACC-TRX-020-03
Preconditions
An isolated workspace has eligible customers, products, matching accounts, an open period and two open batches. Each branch owns separate financial records.
Steps
[ { "do": "Through the registered reversal service cancel 40.00 of paid billing with a 5.00 fee and refund treatment. Inspect the memo, receipt-derived fee credit and refund, then repeat the service command.", "provenance": "proposed", "source": "services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05); services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it issued the fee invoice of 500 and settled it with a credit of 500 made from the check’s freed money; services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js#it requests one refund per payment, 7000 and 3000, each from its own payment; services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a reversal dated in no open period (period_not_open), writing nothing; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-010-reverse-billing-in-one-operation.md#WF-ACC-TRX-010; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-03; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-05; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-03" } ]
Expected
The 5.00 credit pays the fee and the remaining 35.00 follows source-specific return treatment; the replay retains the same component records and pending outcome.
Data
Separate command keys, two customers, invoice lines, receipts and credit; controlled processor outcomes and a fixed calendar where the branch requires them.
Source
services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05); services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it issued the fee invoice of 500 and settled it with a credit of 500 made from the check’s freed money; services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js#it requests one refund per payment, 7000 and 3000, each from its own payment; services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it refuses a reversal dated in no open period (period_not_open), writing nothing; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-010-reverse-billing-in-one-operation.md#WF-ACC-TRX-010; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-03; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-05; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-03

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.