---
id: ATS-ACC-TRX-014
scope: CAP-ACC-TRX-014
product_area: accounting
module: transactions
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-TRX-014-01
    title: Invalid reversal targets preserve billing
    level: api
    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.
    negative: true
    data_needs: 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)
      - TST-ACC-TRX-117
    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)
    category: validation
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it refuses a draft invoice (invoice_not_draft), a line of another
          invoice (invoice_mismatch) and more than a line has left
          (over_application)
        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)
    binding_review: []
  - id: ATS-ACC-TRX-014-02
    title: Cancellation fee uses released receipt value
    level: api
    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.
    negative: false
    data_needs: 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
      - TST-ACC-TRX-117
    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)
    category: interaction
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it wrote the credit memo of 4000 on the line, which freed the line’s
          4000 back onto the check (W-05)
        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)
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it issued the fee invoice of 500 and settled it with a credit of 500
          made from the check’s freed money
        provenance: test
        source: >-
          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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it requested the remainder of 3500 as a refund of the check for the
          staff to pay; the check holds it unapplied until then
        provenance: test
        source: >-
          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
    binding_review: []
  - id: ATS-ACC-TRX-014-03
    title: Remainder returns to each contributing receipt
    level: api
    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.
    negative: false
    data_needs: Two-receipt and single-receipt examples.
    bound_to:
      - >-
        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
        completes with a remainder credit of 1000 from the check, the fee and
        refund steps skipped
      - >-
        react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0328.spec.ts#ACT-ACC-0328
      - TST-ACC-TRX-116
      - TST-ACC-TRX-117
      - TST-ACC-TRX-261
    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
    category: interaction
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js
        assertion: >-
          it requests one refund per payment, 7000 and 3000, each from its own
          payment
        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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it completes with a remainder credit of 1000 from the check, the fee
          and refund steps skipped
        provenance: test
        source: >-
          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
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0328.spec.ts
        assertion: ACT-ACC-0328
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0328.spec.ts#ACT-ACC-0328
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0328.spec.ts#ACT-ACC-0328
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0328.spec.ts#ACT-ACC-0328
        note: >-
          This citation remains component evidence. A browser request driven
          through an API helper does not establish direct database checks or
          every branch of the combined scenario.
  - id: ATS-ACC-TRX-014-04
    title: Reversal refusal and replay retain one result
    level: api
    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.
    negative: true
    data_needs: 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
      - >-
        services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
        replays the same key as the same reversal, writing nothing more
      - TST-ACC-TRX-117
    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
    category: failure
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it refuses a reversal dated in no open period (period_not_open),
          writing nothing
        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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: 'it replays the same key as the same reversal, writing nothing more'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
          replays the same key as the same reversal, writing nothing more
    binding_review: []
  - id: ATS-ACC-TRX-014-05
    title: Preview distinguishes processor and staff returns
    level: api
    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.
    negative: false
    data_needs: 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
      - >-
        react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts#ACT-ACC-0327
      - TST-ACC-TRX-117
      - TST-ACC-TRX-113
      - TST-ACC-TRX-260
    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
    category: boundary
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js
        assertion: >-
          it answers the figures of reversing 2000 more of the dues line with a
          fee of 300 and writes nothing
        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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-check-and-card.integration.spec.js
        assertion: >-
          it previews the refund by who pays it: 4000 through the processor and
          6000 for staff
        provenance: test
        source: >-
          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
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts
        assertion: ACT-ACC-0327
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts#ACT-ACC-0327
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts#ACT-ACC-0327
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts#ACT-ACC-0327
        note: >-
          This citation remains component evidence. A browser request driven
          through an API helper does not establish direct database checks or
          every branch of the combined scenario.
  - id: ATS-ACC-TRX-014-06
    title: Refund outcome determines reversal completion
    level: api
    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.
    negative: false
    data_needs: Gateway confirmation and decline fixtures.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it
        books the credit memo at once although the refund is not paid
      - >-
        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
      - >-
        services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it
        turns failed and completed_with_exception with the processor’s code
      - >-
        services-accounting:modules/transactions/tests/integration/services/reversals/reversal-pending-refund.integration.spec.js#it
        completes the reversal when the sweeper finds the refund settled
      - TST-ACC-TRX-115
      - TST-ACC-TRX-114
    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
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js
        assertion: it books the credit memo at once although the refund is not paid
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it
          books the credit memo at once although the refund is not paid
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js
        assertion: >-
          it turns succeeded and completed when the signed event settles the
          refund
        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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js
        assertion: it turns failed and completed_with_exception with the processor’s code
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it
          turns failed and completed_with_exception with the processor’s code
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-pending-refund.integration.spec.js
        assertion: it completes the reversal when the sweeper finds the refund settled
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/reversals/reversal-pending-refund.integration.spec.js#it
          completes the reversal when the sweeper finds the refund settled
    binding_review: []
  - id: ATS-ACC-TRX-014-07
    title: Billing reversal frees its fee share
    level: api
    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.
    negative: false
    data_needs: 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
      - TST-ACC-TRX-122
    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
    category: rule
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js
        assertion: >-
          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
        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
    binding_review: []
  - id: ATS-ACC-TRX-014-08
    title: Preview authority is separate from creation
    level: api
    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.
    negative: true
    data_needs: 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)
      - TST-ACC-TRX-017
    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)
    category: permission
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/settlements.e2e.spec.js
        assertion: >-
          it is refused the reversal routes without accounting.reversals.create,
          .preview and .read (403)
        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)
    binding_review: []
  - id: ATS-ACC-TRX-014-09
    title: Service cancellation retains each financial component
    category: interaction
    level: api
    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
    exercises:
      - CAP-ACC-TRX-014
      - CAP-ACC-TRX-003
      - CAP-ACC-TRX-011
      - CAP-ACC-TRX-012
      - CAP-ACC-TRX-020
    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.
    negative: false
    data_needs: >-
      Separate command keys, two customers, invoice lines, receipts and credit;
      controlled processor outcomes and a fixed calendar where the branch
      requires them.
    bound_to: []
    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
    test_bindings: []
    binding_review: []
evidence:
  - >-
    services-accounting at f47cb263875bbc0c5640fba7dae6785ec32695f8: the test
    files named in bound_to.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: the Playwright
    journeys ACT-ACC-0327, 0328.
  - >-
    rhythm-v2-docs:specs/accounting/transactions/design: related workflows,
    domain invariants and state transitions examined for the back-fill.
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
coverage_notes:
  edge: >-
    No dedicated edge scenario covers the applicable conditions; the finding
    identifies the remaining specification work.
  concurrency: >-
    No dedicated concurrency scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
  invariant: >-
    No dedicated invariant scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
  transition: >-
    Selected transition scenarios exist, but the listed state paths still need
    explicit guard, effect and actor mappings.
interaction_coverage:
  - to: CAP-ACC-TRX-003
    scenarios:
      - ATS-ACC-TRX-014-09
    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
  - to: CAP-ACC-TRX-011
    scenarios:
      - ATS-ACC-TRX-014-09
    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
  - to: CAP-ACC-TRX-012
    scenarios:
      - ATS-ACC-TRX-014-09
    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
  - to: CAP-ACC-TRX-020
    scenarios:
      - ATS-ACC-TRX-014-09
    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
transition_coverage:
  - state_model: STATE-ACC-TRX-004
    transition: 1
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/reversals/reversal-commands.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/reversals.table.ts;
        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)
  - state_model: STATE-ACC-TRX-004
    transition: 2
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/reversals/reversal-commands.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/reversals.table.ts;
        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
  - state_model: STATE-ACC-TRX-004
    transition: 3
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/reversals/reversal-commands.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/reversals.table.ts;
        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
  - state_model: STATE-ACC-TRX-004
    transition: 4
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/reversals/reversal-commands.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/reversals.table.ts;
        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
  - state_model: STATE-ACC-TRX-004
    transition: 5
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/reversals/reversal-commands.ts:settleReversalOfRefund
  - state_model: STATE-ACC-TRX-002
    transition: 1
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/change-memos/memo-commands.ts;
        services-accounting:modules/transactions/services/payments/free-paid-money.ts;
        services-accounting:modules/transactions/db/credit-memos.table.ts;
        services-accounting:modules/transactions/db/debit-memos.table.ts;
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        answers the memo whole: issued, numbered from 1,000,000, its line and
        total, the invoice’s bill-to
  - state_model: STATE-ACC-TRX-002
    transition: 2
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/change-memos/memo-commands.ts;
        services-accounting:modules/transactions/services/payments/free-paid-money.ts;
        services-accounting:modules/transactions/db/credit-memos.table.ts;
        services-accounting:modules/transactions/db/debit-memos.table.ts;
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        negates the facts on the old accounting date and restates them on the
        new one, the originals untouched
  - state_model: STATE-ACC-TRX-002
    transition: 3
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/change-memos/memo-commands.ts;
        services-accounting:modules/transactions/services/payments/free-paid-money.ts;
        services-accounting:modules/transactions/db/credit-memos.table.ts;
        services-accounting:modules/transactions/db/debit-memos.table.ts;
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        returns the invoice’s balances to what they were before the memo
  - state_model: STATE-ACC-TRX-010
    transition: 1
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        refuses more than an allocation holds (over_refund) and more than the
        unapplied money (over_refund)
  - state_model: STATE-ACC-TRX-010
    transition: 2
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        requests it pending_approval, refusing to execute it
        (refund_not_requested) or to let the requester approve it
        (self_approval)
  - state_model: STATE-ACC-TRX-010
    transition: 3
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        requests it pending_approval, refusing to execute it
        (refund_not_requested) or to let the requester approve it
        (self_approval)
  - state_model: STATE-ACC-TRX-010
    transition: 4
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        refuses executing it again (refund_not_requested) and cancelling it
        (refund_not_cancellable)
  - state_model: STATE-ACC-TRX-010
    transition: 5
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        refuses executing it again (refund_not_requested) and cancelling it
        (refund_not_cancellable)
  - state_model: STATE-ACC-TRX-010
    transition: 6
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        records it offline: executed, the payment partially_refunded with 1000
        refunded (FC-11, FC-14)
  - state_model: STATE-ACC-TRX-010
    transition: 7
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        leaves the payment as it was: nothing unapplied, refunded or pending,
        its facts unchanged
  - state_model: STATE-ACC-TRX-010
    transition: 8
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        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
  - state_model: STATE-ACC-TRX-010
    transition: 9
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        leaves the payment as it was: nothing unapplied, refunded or pending,
        its facts unchanged
  - state_model: STATE-ACC-TRX-010
    transition: 10
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/refunds.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refund-timeout-before-send.integration.spec.js#it
        leaves the refund processing a day on, never failed as never received
        and never abandoned
permission_coverage:
  - key: accounting.reversals.create
    where_checked: api
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#CAP-ACC-TRX-014
  - key: accounting.reversals.preview
    where_checked: api
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#CAP-ACC-TRX-014
  - key: accounting.reversals.read
    where_checked: api
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#CAP-ACC-TRX-014
rule_coverage:
  - rule: BR-CAP-ACC-TRX-014-01
    scenarios:
      - ATS-ACC-TRX-014-01
    provenance: proposed
    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)
  - rule: BR-CAP-ACC-TRX-014-02
    scenarios:
      - ATS-ACC-TRX-014-02
      - ATS-ACC-TRX-014-09
    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)
  - rule: BR-CAP-ACC-TRX-014-03
    scenarios:
      - ATS-ACC-TRX-014-02
      - ATS-ACC-TRX-014-09
    provenance: proposed
    source: >-
      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
  - rule: BR-CAP-ACC-TRX-014-04
    scenarios:
      - ATS-ACC-TRX-014-03
      - ATS-ACC-TRX-014-09
    provenance: proposed
    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
  - rule: BR-CAP-ACC-TRX-014-05
    scenarios:
      - ATS-ACC-TRX-014-04
      - ATS-ACC-TRX-014-09
    provenance: proposed
    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
  - rule: BR-CAP-ACC-TRX-014-06
    scenarios:
      - ATS-ACC-TRX-014-05
    provenance: proposed
    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
  - rule: BR-CAP-ACC-TRX-014-07
    scenarios:
      - ATS-ACC-TRX-014-06
    provenance: proposed
    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
  - rule: BR-CAP-ACC-TRX-014-08
    scenarios:
      - ATS-ACC-TRX-014-07
    provenance: proposed
    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
  - rule: BR-CAP-ACC-TRX-014-09
    scenarios:
      - ATS-ACC-TRX-014-08
    provenance: proposed
    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)
executable_gaps:
  - scenario: ATS-ACC-TRX-014-09
    gap: FND-ACC-TRX-079
    provenance: unknown
    source: FND-ACC-TRX-079
    evidence:
      - >-
        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
invariant_coverage:
  - invariant: INV-DOM-ACC-TRX-001-18
    scenarios:
      - ATS-ACC-TRX-014-04
    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
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
---

# Unwind billed purchases and their collected value: Capability Test Specification

## Coverage

The category map separates specified examples from recorded gaps. The table lists a scenario or finding for each rule requiring proof; a listed scenario may still be proposed. Executable bindings cover their cited assertions, while the transition, permission and invariant registers identify combinations that need further proof.

| Required rule | Scenario or finding |
|---|---|
| `BR-CAP-ACC-TRX-014-01` | `ATS-ACC-TRX-014-01` |
| `BR-CAP-ACC-TRX-014-02` | `ATS-ACC-TRX-014-02`, `ATS-ACC-TRX-014-09` |
| `BR-CAP-ACC-TRX-014-03` | `ATS-ACC-TRX-014-02`, `ATS-ACC-TRX-014-09` |
| `BR-CAP-ACC-TRX-014-04` | `ATS-ACC-TRX-014-03`, `ATS-ACC-TRX-014-09` |
| `BR-CAP-ACC-TRX-014-05` | `ATS-ACC-TRX-014-04`, `ATS-ACC-TRX-014-09` |
| `BR-CAP-ACC-TRX-014-06` | `ATS-ACC-TRX-014-05` |
| `BR-CAP-ACC-TRX-014-07` | `ATS-ACC-TRX-014-06` |
| `BR-CAP-ACC-TRX-014-08` | `ATS-ACC-TRX-014-07` |
| `BR-CAP-ACC-TRX-014-09` | `ATS-ACC-TRX-014-08` |

## Interactions With Related Capabilities

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.

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. The complete chain remains proposed until one executable run proves its combined outcomes.
