---
id: ATS-ACC-TRX-003
scope: CAP-ACC-TRX-003
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-003-01
    title: Memo targets must belong to eligible invoices
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-01
    preconditions: 'Draft, quote and issued invoices span two units.'
    steps:
      - do: Credit ineligible documents or unrelated invoice lines.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          is refused 400 business_unit_mismatch for a line of another invoice of
          the unit (the ledger trigger’s check)
    expected: All invalid targets fail and existing debt remains intact.
    negative: true
    data_needs: Issued invoices in separate units.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        is refused 409 invoice_not_draft
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        is refused 400 business_unit_mismatch for a line of another invoice of
        the unit (the ledger trigger’s check)
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        is refused 400 business_unit_mismatch for a line of another unit’s
        invoice (the composite key)
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0182.spec.ts#ACT-ACC-0182
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0215.spec.ts#ACT-ACC-0215
      - TST-ACC-TRX-034
      - TST-ACC-TRX-220
      - TST-ACC-TRX-237
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      is refused 400 business_unit_mismatch for a line of another invoice of the
      unit (the ledger trigger’s check)
    category: validation
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: it is refused 409 invoice_not_draft
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          is refused 409 invoice_not_draft
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it is refused 400 business_unit_mismatch for a line of another invoice
          of the unit (the ledger trigger’s check)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          is refused 400 business_unit_mismatch for a line of another invoice of
          the unit (the ledger trigger’s check)
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it is refused 400 business_unit_mismatch for a line of another unit’s
          invoice (the composite key)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          is refused 400 business_unit_mismatch for a line of another unit’s
          invoice (the composite key)
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0182.spec.ts
        assertion: ACT-ACC-0182
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0182.spec.ts#ACT-ACC-0182
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0215.spec.ts
        assertion: ACT-ACC-0215
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0215.spec.ts#ACT-ACC-0215
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0182.spec.ts#ACT-ACC-0182
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0182.spec.ts#ACT-ACC-0182
        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.
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0215.spec.ts#ACT-ACC-0215
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0215.spec.ts#ACT-ACC-0215
        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-003-02
    title: Saving memos issues them immediately
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-02
    preconditions: A real issued invoice is available.
    steps:
      - do: Create one memo of each kind.
        provenance: test
        source: >-
          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
    expected: Both issue using their own sequences beginning at one million.
    negative: false
    data_needs: A workspace with unused memo sequences.
    bound_to:
      - >-
        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
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
        answers the memo whole: issued, numbered from 1,000,000, its line naming
        the line it added
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0192.spec.ts#ACT-ACC-0192
      - TST-ACC-TRX-034
      - TST-ACC-TRX-035
      - TST-ACC-TRX-225
    provenance: test
    source: >-
      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
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it answers the memo whole: issued, numbered from 1,000,000, its line
          and total, the invoice’s bill-to
        provenance: test
        source: >-
          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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js
        assertion: >-
          it answers the memo whole: issued, numbered from 1,000,000, its line
          naming the line it added
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          answers the memo whole: issued, numbered from 1,000,000, its line
          naming the line it added
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0192.spec.ts
        assertion: ACT-ACC-0192
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0192.spec.ts#ACT-ACC-0192
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0192.spec.ts#ACT-ACC-0192
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0192.spec.ts#ACT-ACC-0192
        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-003-03
    title: Excessive credit leaves no financial footprint
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-03
      - INV-DOM-ACC-TRX-001-13
    preconditions: An unpaid line owes 80.00.
    steps:
      - do: Request an 80.01 credit.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          writes nothing: no memo, no ledger line, no fact, no event
    expected: 'Refusal leaves no memo, allocation, receivable fact or event.'
    negative: true
    data_needs: An outstanding line with no prior applications.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        is refused 400 over_application
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        writes nothing: no memo, no ledger line, no fact, no event
      - >-
        services-accounting:modules/transactions/tests/integration/db/invoices.table.integration.spec.js#it
        refuses a credit memo line that credits more than the line owes, through
        the ledger trigger (invoice_lines_balance_due_check)
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0196.spec.ts#ACT-ACC-0196
      - TST-ACC-TRX-034
      - TST-ACC-TRX-022
      - TST-ACC-TRX-229
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      writes nothing: no memo, no ledger line, no fact, no event
    category: failure
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: it is refused 400 over_application
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          is refused 400 over_application
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: 'it writes nothing: no memo, no ledger line, no fact, no event'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          writes nothing: no memo, no ledger line, no fact, no event
      - file: >-
          services-accounting:modules/transactions/tests/integration/db/invoices.table.integration.spec.js
        assertion: >-
          it refuses a credit memo line that credits more than the line owes,
          through the ledger trigger (invoice_lines_balance_due_check)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/db/invoices.table.integration.spec.js#it
          refuses a credit memo line that credits more than the line owes,
          through the ledger trigger (invoice_lines_balance_due_check)
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0196.spec.ts
        assertion: ACT-ACC-0196
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0196.spec.ts#ACT-ACC-0196
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0196.spec.ts#ACT-ACC-0196
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0196.spec.ts#ACT-ACC-0196
        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-003-04
    title: Paid-value freeing follows receipt recency
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-04
    preconditions: Two receipts contributed 35.00 and 25.00.
    steps:
      - do: >-
          Credit 10.00, replay it, credit 30.00 on another equivalent line and
          exceed total eligible value.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          frees the newest check’s remaining 15.00 first, then 15.00 of the
          older check, each holding what was freed from it
    expected: >-
      The newest receipt frees first, replay adds nothing, and excessive credit
      preserves allocations.
    negative: false
    data_needs: Two chronologically ordered checks.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
        frees 10.00 from the newest check alone, back on that check as unapplied
        cash, the older check untouched; the line credited 10.00 and owing
        nothing
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
        answers the same memo to the same request again, freeing nothing twice
        (idempotent)
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
        frees the newest check’s remaining 15.00 first, then 15.00 of the older
        check, each holding what was freed from it
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
        is refused over_application and changes no allocation or balance
        (atomic)
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0197.spec.ts#ACT-ACC-0197
      - TST-ACC-TRX-033
      - TST-ACC-TRX-230
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it
    category: interaction
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js
        assertion: >-
          it frees 10.00 from the newest check alone, back on that check as
          unapplied cash, the older check untouched; the line credited 10.00 and
          owing nothing
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          frees 10.00 from the newest check alone, back on that check as
          unapplied cash, the older check untouched; the line credited 10.00 and
          owing nothing
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js
        assertion: >-
          it answers the same memo to the same request again, freeing nothing
          twice (idempotent)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          answers the same memo to the same request again, freeing nothing twice
          (idempotent)
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js
        assertion: >-
          it frees the newest check’s remaining 15.00 first, then 15.00 of the
          older check, each holding what was freed from it
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          frees the newest check’s remaining 15.00 first, then 15.00 of the
          older check, each holding what was freed from it
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js
        assertion: >-
          it is refused over_application and changes no allocation or balance
          (atomic)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          is refused over_application and changes no allocation or balance
          (atomic)
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0197.spec.ts
        assertion: ACT-ACC-0197
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0197.spec.ts#ACT-ACC-0197
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0197.spec.ts#ACT-ACC-0197
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0197.spec.ts#ACT-ACC-0197
        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-003-05
    title: Memo-derived standing matches the treatment
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-06
    preconditions: >-
      An unpaid bill has two lines and another bill permits a retroactive
      coupon.
    steps:
      - do: Fully credit each line in sequence and apply the coupon memo.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          makes the credited line cancelled and leaves the invoice open with the
          other line’s 80.00
    expected: >-
      One cancelled line leaves the bill open, both cancel it, and coupon
      treatment marks its lines paid.
    negative: false
    data_needs: Ordinary and coupon adjustment fixtures.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        makes the credited line cancelled and leaves the invoice open with the
        other line’s 80.00
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        makes the header cancelled once a second memo credits the other line
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        makes every line and the header paid, not cancelled
      - TST-ACC-TRX-034
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it makes the credited line cancelled and leaves the invoice open with
          the other line’s 80.00
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          makes the credited line cancelled and leaves the invoice open with the
          other line’s 80.00
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it makes the header cancelled once a second memo credits the other
          line
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          makes the header cancelled once a second memo credits the other line
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: 'it makes every line and the header paid, not cancelled'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          makes every line and the header paid, not cancelled
    binding_review: []
  - id: ATS-ACC-TRX-003-06
    title: Added debit remains distinct from original totals
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-07
    preconditions: Two invoice lines already exist.
    steps:
      - do: Add a late charge through a debit memo.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          raises the header’s balance by the memo, its totals its own
    expected: >-
      A third zero-priced line increases debt without replacing original invoice
      totals.
    negative: false
    data_needs: A late-fee product choice.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
        adds a third line of origin debit_memo, priced zero, its accounting
        frozen from the unit’s defaults
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
        raises the header’s balance by the memo, its totals its own
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0194.spec.ts#ACT-ACC-0194
      - TST-ACC-TRX-035
      - TST-ACC-TRX-227
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
      raises the header’s balance by the memo, its totals its own
    category: rule
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js
        assertion: >-
          it adds a third line of origin debit_memo, priced zero, its accounting
          frozen from the unit’s defaults
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          adds a third line of origin debit_memo, priced zero, its accounting
          frozen from the unit’s defaults
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js
        assertion: 'it raises the header’s balance by the memo, its totals its own'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          raises the header’s balance by the memo, its totals its own
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0194.spec.ts
        assertion: ACT-ACC-0194
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0194.spec.ts#ACT-ACC-0194
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0194.spec.ts#ACT-ACC-0194
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0194.spec.ts#ACT-ACC-0194
        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-003-07
    title: Memo tax respects source and exemption
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-08
    preconditions: 'Taxed dues, untaxed gala and exempt billing are available.'
    steps:
      - do: 'Credit dues, debit a taxable charge and debit the exempt invoice.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
          apportions the dues line’s credit between the net and each tax line as
          the line was taxed, each row naming the invoice tax line it reverses
    expected: >-
      Credit proportions retain the original tax split; debit adds tax except on
      exemption.
    negative: false
    data_needs: Tax configuration and exempt party data.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
        apportions the dues line’s credit between the net and each tax line as
        the line was taxed, each row naming the invoice tax line it reverses
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
        taxes the added line at the invoice’s address and adds the tax to the
        amount requested: the memo line is the gross
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
        adds no tax on an exempt invoice
      - TST-ACC-TRX-036
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
      apportions the dues line’s credit between the net and each tax line as the
      line was taxed, each row naming the invoice tax line it reverses
    category: boundary
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js
        assertion: >-
          it apportions the dues line’s credit between the net and each tax line
          as the line was taxed, each row naming the invoice tax line it
          reverses
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
          apportions the dues line’s credit between the net and each tax line as
          the line was taxed, each row naming the invoice tax line it reverses
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js
        assertion: >-
          it taxes the added line at the invoice’s address and adds the tax to
          the amount requested: the memo line is the gross
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
          taxes the added line at the invoice’s address and adds the tax to the
          amount requested: the memo line is the gross
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js
        assertion: it adds no tax on an exempt invoice
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
          adds no tax on an exempt invoice
    binding_review: []
  - id: ATS-ACC-TRX-003-08
    title: Memo void preserves opposing lines
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-09
      - INV-DOM-ACC-TRX-001-14
    preconditions: A memo eliminated the invoice’s billed value.
    steps:
      - do: Void it and request a second void.
        provenance: test
        source: >-
          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
    expected: New negative lines restore debt and today’s facts; repeat void fails.
    negative: false
    data_needs: A fully credited invoice.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        answers the memo void, its negating lines after the originals, each
        naming the line it reverses
      - >-
        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
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        writes a credit_memo_voided fact of plus each line’s amount, dated today
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        refuses a second void 409 stale, the memo being void
      - >-
        services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
        is 400 without a reason
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0193.spec.ts#ACT-ACC-0193
      - TST-ACC-TRX-034
      - TST-ACC-TRX-003
      - TST-ACC-TRX-226
    provenance: test
    source: >-
      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
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it answers the memo void, its negating lines after the originals, each
          naming the line it reverses
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          answers the memo void, its negating lines after the originals, each
          naming the line it reverses
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: it returns the invoice’s balances to what they were before the memo
        provenance: test
        source: >-
          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
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it writes a credit_memo_voided fact of plus each line’s amount, dated
          today
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          writes a credit_memo_voided fact of plus each line’s amount, dated
          today
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: 'it refuses a second void 409 stale, the memo being void'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          refuses a second void 409 stale, the memo being void
      - file: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js
        assertion: it is 400 without a reason
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
          is 400 without a reason
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0193.spec.ts
        assertion: ACT-ACC-0193
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0193.spec.ts#ACT-ACC-0193
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0193.spec.ts#ACT-ACC-0193
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0193.spec.ts#ACT-ACC-0193
        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-003-09
    title: Later credit blocks an excessive debit void
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-10
    preconditions: Half of a 10.00 added debit has been credited.
    steps:
      - do: Void the entire debit memo.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          is refused 400 over_application
    expected: No change occurs and the remaining added debt stays 5.00.
    negative: true
    data_needs: A debit line with a subsequent credit.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
        is refused 400 over_application
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
        leaves the added line owing the 5.00 the credit left
      - TST-ACC-TRX-035
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
      is refused 400 over_application
    category: edge
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js
        assertion: it is refused 400 over_application
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          is refused 400 over_application
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js
        assertion: it leaves the added line owing the 5.00 the credit left
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
          leaves the added line owing the 5.00 the credit left
    binding_review: []
  - id: ATS-ACC-TRX-003-10
    title: Memo batch selection stays within the unit
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-11
    preconditions: A foreign-unit batch and a rule-less unit are available.
    steps:
      - do: >-
          Create with the foreign batch, then omit selection in the rule-less
          unit.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          refuses no batch in a unit without batch assignment settings 409
          batch_required
    expected: Invalid batch and absent assignment are refused.
    negative: true
    data_needs: Two units and their batch contexts.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        refuses another unit’s batch 409 batch_not_open
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        refuses no batch in a unit without batch assignment settings 409
        batch_required
      - TST-ACC-TRX-034
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      refuses no batch in a unit without batch assignment settings 409
      batch_required
    category: boundary
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: it refuses another unit’s batch 409 batch_not_open
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          refuses another unit’s batch 409 batch_not_open
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js
        assertion: >-
          it refuses no batch in a unit without batch assignment settings 409
          batch_required
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          refuses no batch in a unit without batch assignment settings 409
          batch_required
    binding_review: []
  - id: ATS-ACC-TRX-003-11
    title: Memo write authority cannot be inferred from read
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-12
    preconditions: The caller can inspect memos.
    steps:
      - do: 'Attempt create, void, detail and batch operations, then list actions.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
          is refused the create, the void, the details and the batch routes 403
          permission_missing
    expected: 'Writes are denied, actions are empty and inspection remains allowed.'
    negative: true
    data_needs: A memo reader identity.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
        is refused the create, the void, the details and the batch routes 403
        permission_missing
      - >-
        services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
        lists no action
      - >-
        services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
        is refused every credit memo route 403 permission_missing
      - TST-ACC-TRX-003
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
      is refused the create, the void, the details and the batch routes 403
      permission_missing
    category: permission
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js
        assertion: >-
          it is refused the create, the void, the details and the batch routes
          403 permission_missing
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
          is refused the create, the void, the details and the batch routes 403
          permission_missing
      - file: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js
        assertion: it lists no action
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
          lists no action
      - file: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js
        assertion: it is refused every credit memo route 403 permission_missing
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
          is refused every credit memo route 403 permission_missing
    binding_review: []
  - id: ATS-ACC-TRX-003-12
    title: Reduction releases money before cancellation coordinates its return
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-TRX-003-04
      - BR-CAP-ACC-TRX-003-06
      - BR-CAP-ACC-TRX-008-04
      - BR-CAP-ACC-TRX-008-06
      - BR-CAP-ACC-TRX-014-02
      - BR-CAP-ACC-TRX-014-04
      - BR-CAP-ACC-TRX-015-01
      - BR-CAP-ACC-TRX-015-03
      - BR-CAP-ACC-TRX-011-02
      - BR-CAP-ACC-TRX-012-03
    exercises:
      - CAP-ACC-TRX-003
      - CAP-ACC-TRX-008
      - CAP-ACC-TRX-014
      - CAP-ACC-TRX-015
      - CAP-ACC-TRX-011
      - CAP-ACC-TRX-012
    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: >-
          Settle an 80.00 bill, credit 20.00, place the released money on
          another eligible bill, and run a separate cancellation with refund
          treatment. Move the unposted memo to another eligible batch. In
          another branch, convert released money into customer credit and
          request a source-specific refund.
        provenance: proposed
        source: >-
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
          frees the newest check’s remaining 15.00 first, then 15.00 of the
          older check, each holding what was freed from it;
          services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
          makes the credited line cancelled and leaves the invoice open with the
          other line’s 80.00;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
          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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
          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-04;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
          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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
    expected: >-
      The reduction frees exactly 20.00 for allocation; the coordinated
      cancellation retains separate adjustment and return records; moving the
      memo changes no customer value.
    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/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-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-0182, 0192 to 0197, 0215.
  - >-
    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-068'
  validation: covered
  permission: covered
  edge: covered
  failure: covered
  boundary: covered
  concurrency: 'gap: FND-ACC-TRX-068'
  invariant: 'gap: FND-ACC-TRX-068'
  interaction: covered
coverage_notes:
  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-008
    scenarios:
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
  - to: CAP-ACC-TRX-011
    scenarios:
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
  - to: CAP-ACC-TRX-012
    scenarios:
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
  - to: CAP-ACC-TRX-014
    scenarios:
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
  - to: CAP-ACC-TRX-015
    scenarios:
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it;
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
      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-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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06;
      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-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03;
      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-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03
transition_coverage:
  - state_model: STATE-ACC-TRX-002
    transition: 1
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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
permission_coverage:
  - key: accounting.credit-memos.create
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
  - key: accounting.credit-memos.read
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
  - key: accounting.credit-memos.update
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
  - key: accounting.debit-memos.create
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
  - key: accounting.debit-memos.read
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
  - key: accounting.debit-memos.update
    where_checked: api
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    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-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#CAP-ACC-TRX-003
rule_coverage:
  - rule: BR-CAP-ACC-TRX-003-01
    scenarios:
      - ATS-ACC-TRX-003-01
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      is refused 400 business_unit_mismatch for a line of another invoice of the
      unit (the ledger trigger’s check)
  - rule: BR-CAP-ACC-TRX-003-02
    scenarios:
      - ATS-ACC-TRX-003-02
    provenance: proposed
    source: >-
      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
  - rule: BR-CAP-ACC-TRX-003-03
    scenarios:
      - ATS-ACC-TRX-003-03
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      writes nothing: no memo, no ledger line, no fact, no event
  - rule: BR-CAP-ACC-TRX-003-04
    scenarios:
      - ATS-ACC-TRX-003-04
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
      frees the newest check’s remaining 15.00 first, then 15.00 of the older
      check, each holding what was freed from it
  - rule: BR-CAP-ACC-TRX-003-06
    scenarios:
      - ATS-ACC-TRX-003-05
      - ATS-ACC-TRX-003-12
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      makes the credited line cancelled and leaves the invoice open with the
      other line’s 80.00
  - rule: BR-CAP-ACC-TRX-003-07
    scenarios:
      - ATS-ACC-TRX-003-06
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
      raises the header’s balance by the memo, its totals its own
  - rule: BR-CAP-ACC-TRX-003-08
    scenarios:
      - ATS-ACC-TRX-003-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it
      apportions the dues line’s credit between the net and each tax line as the
      line was taxed, each row naming the invoice tax line it reverses
  - rule: BR-CAP-ACC-TRX-003-09
    scenarios:
      - ATS-ACC-TRX-003-08
    provenance: proposed
    source: >-
      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
  - rule: BR-CAP-ACC-TRX-003-10
    scenarios:
      - ATS-ACC-TRX-003-09
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it
      is refused 400 over_application
  - rule: BR-CAP-ACC-TRX-003-11
    scenarios:
      - ATS-ACC-TRX-003-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      refuses no batch in a unit without batch assignment settings 409
      batch_required
  - rule: BR-CAP-ACC-TRX-003-12
    scenarios:
      - ATS-ACC-TRX-003-11
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it
      is refused the create, the void, the details and the batch routes 403
      permission_missing
executable_gaps:
  - scenario: ATS-ACC-TRX-003-12
    gap: FND-ACC-TRX-068
    provenance: unknown
    source: FND-ACC-TRX-068
    evidence:
      - >-
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it
        frees the newest check’s remaining 15.00 first, then 15.00 of the older
        check, each holding what was freed from it;
        services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
        makes the credited line cancelled and leaves the invoice open with the
        other line’s 80.00;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003;
        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-13
    scenarios:
      - ATS-ACC-TRX-003-03
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it
      writes nothing: no memo, no ledger line, no fact, no event
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
  - invariant: INV-DOM-ACC-TRX-001-14
    scenarios:
      - ATS-ACC-TRX-003-08
    provenance: test
    source: >-
      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
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
---

# Adjust billed value with memos: 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-003-01` | `ATS-ACC-TRX-003-01` |
| `BR-CAP-ACC-TRX-003-02` | `ATS-ACC-TRX-003-02` |
| `BR-CAP-ACC-TRX-003-03` | `ATS-ACC-TRX-003-03` |
| `BR-CAP-ACC-TRX-003-04` | `ATS-ACC-TRX-003-04`, `ATS-ACC-TRX-003-12` |
| `BR-CAP-ACC-TRX-003-06` | `ATS-ACC-TRX-003-05`, `ATS-ACC-TRX-003-12` |
| `BR-CAP-ACC-TRX-003-07` | `ATS-ACC-TRX-003-06` |
| `BR-CAP-ACC-TRX-003-08` | `ATS-ACC-TRX-003-07` |
| `BR-CAP-ACC-TRX-003-09` | `ATS-ACC-TRX-003-08` |
| `BR-CAP-ACC-TRX-003-10` | `ATS-ACC-TRX-003-09` |
| `BR-CAP-ACC-TRX-003-11` | `ATS-ACC-TRX-003-10` |
| `BR-CAP-ACC-TRX-003-12` | `ATS-ACC-TRX-003-11` |

## Interactions With Related Capabilities

Settle an 80.00 bill, credit 20.00, place the released money on another eligible bill, and run a separate cancellation with refund treatment. Move the unposted memo to another eligible batch. In another branch, convert released money into customer credit and request a source-specific refund.

The reduction frees exactly 20.00 for allocation; the coordinated cancellation retains separate adjustment and return records; moving the memo changes no customer value. The complete chain remains proposed until one executable run proves its combined outcomes.
