---
id: ATS-ACC-TRX-002
scope: CAP-ACC-TRX-002
product_area: accounting
module: transactions
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-TRX-002-01
    title: Amendment retains a revised bill and its delta
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-01
      - BR-CAP-ACC-TRX-002-03
    preconditions: An unposted invoice contains paid and unpaid lines.
    steps:
      - do: 'Add a charge, reprice the unpaid line and inspect history.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          answers the invoice at revision 2 with the line added after the last,
          the line repriced and the totals re-derived
    expected: >-
      Revision two retains the new ordering, recomputed totals, delta entries
      and amendment event.
    negative: false
    data_needs: An open batch and partial check payment.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        answers the invoice at revision 2 with the line added after the last,
        the line repriced and the totals re-derived
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        writes the amended facts for the delta, the originals untouched, and the
        amend event with the delta
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        taxes the added line at the invoice’s address and re-makes the repriced
        line’s tax lines from its new net amount
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        amends an issued, unposted invoice (POST .../amend): a line added, the
        revision 2, the e-mail subject saying so
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0190.spec.ts#ACT-ACC-0190
      - TST-ACC-TRX-039
      - TST-ACC-TRX-010
      - TST-ACC-TRX-224
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      answers the invoice at revision 2 with the line added after the last, the
      line repriced and the totals re-derived
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it answers the invoice at revision 2 with the line added after the
          last, the line repriced and the totals re-derived
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          answers the invoice at revision 2 with the line added after the last,
          the line repriced and the totals re-derived
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it writes the amended facts for the delta, the originals untouched,
          and the amend event with the delta
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          writes the amended facts for the delta, the originals untouched, and
          the amend event with the delta
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it taxes the added line at the invoice’s address and re-makes the
          repriced line’s tax lines from its new net amount
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          taxes the added line at the invoice’s address and re-makes the
          repriced line’s tax lines from its new net amount
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it amends an issued, unposted invoice (POST .../amend): a line added,
          the revision 2, the e-mail subject saying so
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          amends an issued, unposted invoice (POST .../amend): a line added, the
          revision 2, the e-mail subject saying so
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0190.spec.ts
        assertion: ACT-ACC-0190
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0190.spec.ts#ACT-ACC-0190
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0190.spec.ts#ACT-ACC-0190
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0190.spec.ts#ACT-ACC-0190
        note: >-
          Amendment is performed through the API. The browser does not establish
          a connected console amendment control or direct access to its
          financial facts.
  - id: ATS-ACC-TRX-002-02
    title: Applied lines resist replacement
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-02
      - INV-DOM-ACC-TRX-001-10
    preconditions: A line on an unposted bill has received money.
    steps:
      - do: Request removal and repricing of that line.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          removes a line with nothing applied at the next revision, and refuses
          removing or repricing the paid line
    expected: Both attempts identify the protected line and preserve the invoice.
    negative: true
    data_needs: One retained allocation.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        removes a line with nothing applied at the next revision, and refuses
        removing or repricing the paid line
      - TST-ACC-TRX-039
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      removes a line with nothing applied at the next revision, and refuses
      removing or repricing the paid line
    category: invariant
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it removes a line with nothing applied at the next revision, and
          refuses removing or repricing the paid line
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          removes a line with nothing applied at the next revision, and refuses
          removing or repricing the paid line
    binding_review: []
  - id: ATS-ACC-TRX-002-03
    title: Posting prevents commercial correction
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-04
    preconditions: The invoice’s batch has posted.
    steps:
      - do: 'Attempt an amendment and date change, then edit descriptive text.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          is refused batch_not_open once the batch is posted
    expected: Financial changes fail while allowed text editing succeeds.
    negative: true
    data_needs: A posted transaction batch.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        is refused batch_not_open once the batch is posted
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        is refused batch_not_open on a change of its dates, while its text still
        changes
      - TST-ACC-TRX-039
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      is refused batch_not_open once the batch is posted
    category: boundary
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: it is refused batch_not_open once the batch is posted
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          is refused batch_not_open once the batch is posted
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it is refused batch_not_open on a change of its dates, while its text
          still changes
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          is refused batch_not_open on a change of its dates, while its text
          still changes
    binding_review: []
  - id: ATS-ACC-TRX-002-04
    title: Posted debt cannot be voided
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-04
    preconditions: The posted invoice has no applications.
    steps:
      - do: Attempt a reasoned void.
        provenance: proposed
        source: >-
          services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4
    expected: The batch refusal leaves the invoice open and its debt unchanged.
    negative: true
    data_needs: Posted invoice context.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4'
    category: failure
    test_bindings: []
    binding_review: []
  - id: ATS-ACC-TRX-002-05
    title: Terms and explicit dates use the right precedence
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-05
    preconditions: The invoice starts with thirty-day terms.
    steps:
      - do: >-
          Select ten-day terms, combine terms with a date, then request a date
          before billing.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          answers the memo, the terms and the explicit due date, which wins over
          the terms’ own
    expected: The derived and explicit dates apply; the invalid request changes nothing.
    negative: false
    data_needs: Ten-day and thirty-day definitions.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
        recomputes the due date from the terms: ten days after the invoice date
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
        answers the memo, the terms and the explicit due date, which wins over
        the terms’ own
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
        is refused as an invalid request naming the due date
      - TST-ACC-TRX-049
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
      answers the memo, the terms and the explicit due date, which wins over the
      terms’ own
    category: rule
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js
        assertion: >-
          it recomputes the due date from the terms: ten days after the invoice
          date
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          recomputes the due date from the terms: ten days after the invoice
          date
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js
        assertion: >-
          it answers the memo, the terms and the explicit due date, which wins
          over the terms’ own
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          answers the memo, the terms and the explicit due date, which wins over
          the terms’ own
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js
        assertion: it is refused as an invalid request naming the due date
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          is refused as an invalid request naming the due date
    binding_review: []
  - id: ATS-ACC-TRX-002-06
    title: Details update atomically
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-06
    preconditions: An issued bill can reference a document template.
    steps:
      - do: >-
          Submit memo and terms with an invalid date, then correct the
          descriptive fields.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          leaves the memo, the terms, the due date and the version as they were
    expected: >-
      Invalid input preserves fields and version; valid input records only
      requested changes and its event.
    negative: false
    data_needs: An invoice template.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
        leaves the memo, the terms, the due date and the version as they were
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js#it
        changes the memo, the notes, the purchase order number and the template
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js#it
        changes nothing else
      - TST-ACC-TRX-049
      - TST-ACC-TRX-050
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
      leaves the memo, the terms, the due date and the version as they were
    category: failure
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js
        assertion: >-
          it leaves the memo, the terms, the due date and the version as they
          were
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
          leaves the memo, the terms, the due date and the version as they were
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js
        assertion: >-
          it changes the memo, the notes, the purchase order number and the
          template
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js#it
          changes the memo, the notes, the purchase order number and the
          template
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js
        assertion: it changes nothing else
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js#it
          changes nothing else
    binding_review: []
  - id: ATS-ACC-TRX-002-07
    title: Date correction retains opposing history
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-07
    preconditions: An issued invoice remains unposted.
    steps:
      - do: 'Move its date into another open period, then beyond its due date.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          moves the invoice date of an issued, unposted invoice, re-dating its
          facts; refuses a date after its due date
    expected: Correcting entries relocate the receivable; the later invalid date fails.
    negative: false
    data_needs: Open periods covering the intended dates.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        moves the invoice date of an issued, unposted invoice, re-dating its
        facts; refuses a date after its due date
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        moves the invoice date of an issued, unposted invoice (PUT .../details),
        the due date staying after it
      - TST-ACC-TRX-039
      - TST-ACC-TRX-010
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      moves the invoice date of an issued, unposted invoice, re-dating its
      facts; refuses a date after its due date
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js
        assertion: >-
          it moves the invoice date of an issued, unposted invoice, re-dating
          its facts; refuses a date after its due date
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          moves the invoice date of an issued, unposted invoice, re-dating its
          facts; refuses a date after its due date
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it moves the invoice date of an issued, unposted invoice (PUT
          .../details), the due date staying after it
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          moves the invoice date of an issued, unposted invoice (PUT
          .../details), the due date staying after it
    binding_review: []
  - id: ATS-ACC-TRX-002-08
    title: Void requires an untouched financial position
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-08
      - BR-CAP-ACC-TRX-002-09
      - INV-DOM-ACC-TRX-001-12
    preconditions: 'Draft, untouched issued, memo-adjusted and written-off invoices exist.'
    steps:
      - do: 'Void each with an explanation, then repeat a completed void.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
          is refused invoice_has_money_applied, the invoice unchanged
    expected: >-
      Eligible documents void with today’s offsets; adjusted and repeated
      attempts fail.
    negative: false
    data_needs: Credit-memo and write-off examples.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
        becomes void with the reason, the caller and the instant
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
        appends an invoice_voided fact per line for minus the line’s balance,
        dated today
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
        is refused invoice_has_money_applied, the invoice unchanged
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
        refuses voiding it again, the invoice unchanged
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0183.spec.ts#ACT-ACC-0183
      - TST-ACC-TRX-066
      - TST-ACC-TRX-221
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
      is refused invoice_has_money_applied, the invoice unchanged
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
        assertion: 'it becomes void with the reason, the caller and the instant'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
          becomes void with the reason, the caller and the instant
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
        assertion: >-
          it appends an invoice_voided fact per line for minus the line’s
          balance, dated today
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
          appends an invoice_voided fact per line for minus the line’s balance,
          dated today
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
        assertion: 'it is refused invoice_has_money_applied, the invoice unchanged'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
          is refused invoice_has_money_applied, the invoice unchanged
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
        assertion: 'it refuses voiding it again, the invoice unchanged'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
          refuses voiding it again, the invoice unchanged
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0183.spec.ts
        assertion: ACT-ACC-0183
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0183.spec.ts#ACT-ACC-0183
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0183.spec.ts#ACT-ACC-0183
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0183.spec.ts#ACT-ACC-0183
        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-002-09
    title: Protection controls allowed invoice changes
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-10
    preconditions: Examples have full protection and deletion-only protection.
    steps:
      - do: 'Attempt issue, details, removal and void operations.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
          refuses the void of the issued invoice, which stays open
    expected: Full protection blocks mutations; deletion-only protection blocks removal.
    negative: true
    data_needs: Owner-selected record locks.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
        refuses the issue, the details change and the delete of the draft, each
        in the configuration module’s words
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
        refuses the void of the issued invoice, which stays open
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
        refuses the delete, and lets the details change through
      - TST-ACC-TRX-058
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
      refuses the void of the issued invoice, which stays open
    category: invariant
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js
        assertion: >-
          it refuses the issue, the details change and the delete of the draft,
          each in the configuration module’s words
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
          refuses the issue, the details change and the delete of the draft,
          each in the configuration module’s words
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js
        assertion: 'it refuses the void of the issued invoice, which stays open'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
          refuses the void of the issued invoice, which stays open
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js
        assertion: 'it refuses the delete, and lets the details change through'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
          refuses the delete, and lets the details change through
    binding_review: []
  - id: ATS-ACC-TRX-002-10
    title: Correction authority is distinct from reading
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-11
    preconditions: The caller has invoice read authority alone.
    steps:
      - do: 'Attempt amendment, terms, due date, details and void commands.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          is refused POST /invoices/{tenantId}/{id}/void without
          accounting.invoices.void (403)
    expected: Every mutation is denied without changing the document.
    negative: true
    data_needs: A reader identity.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        is refused POST /invoices/{tenantId}/{id}/amend without
        accounting.invoices.adjust (403)
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        is refused PUT /invoices/{tenantId}/{id}/terms without
        accounting.invoices.update (403)
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        is refused PUT /invoices/{tenantId}/{id}/details without
        accounting.invoices.update (403)
      - >-
        services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
        is refused POST /invoices/{tenantId}/{id}/void without
        accounting.invoices.void (403)
      - >-
        react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0205.spec.ts#ACT-ACC-0205
      - TST-ACC-TRX-010
      - TST-ACC-TRX-234
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
      is refused POST /invoices/{tenantId}/{id}/void without
      accounting.invoices.void (403)
    category: permission
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it is refused POST /invoices/{tenantId}/{id}/amend without
          accounting.invoices.adjust (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          is refused POST /invoices/{tenantId}/{id}/amend without
          accounting.invoices.adjust (403)
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it is refused PUT /invoices/{tenantId}/{id}/terms without
          accounting.invoices.update (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          is refused PUT /invoices/{tenantId}/{id}/terms without
          accounting.invoices.update (403)
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it is refused PUT /invoices/{tenantId}/{id}/details without
          accounting.invoices.update (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          is refused PUT /invoices/{tenantId}/{id}/details without
          accounting.invoices.update (403)
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js
        assertion: >-
          it is refused POST /invoices/{tenantId}/{id}/void without
          accounting.invoices.void (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
          is refused POST /invoices/{tenantId}/{id}/void without
          accounting.invoices.void (403)
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0205.spec.ts
        assertion: ACT-ACC-0205
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0205.spec.ts#ACT-ACC-0205
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0205.spec.ts#ACT-ACC-0205
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/invoices/ACT-ACC-0205.spec.ts#ACT-ACC-0205
        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-002-11
    title: Posting changes the available correction
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-TRX-002-01
      - BR-CAP-ACC-TRX-002-04
      - BR-CAP-ACC-TRX-003-02
      - BR-CAP-ACC-TRX-003-03
      - BR-CAP-ACC-TRX-015-01
      - BR-CAP-ACC-TRX-015-03
    exercises:
      - CAP-ACC-TRX-002
      - CAP-ACC-TRX-003
      - CAP-ACC-TRX-015
    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: >-
          Amend a live 80.00 bill in an open batch, move it to another eligible
          batch, then attempt amendment after that batch posts and record a
          credit memo instead.
        provenance: proposed
        source: >-
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          answers the invoice at revision 2 with the line added after the last,
          the line repriced and the totals re-derived;
          services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
          is refused batch_not_open once the batch is posted;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-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-02;
          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-03;
          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
    expected: >-
      The unposted revision and move retain one bill; the later amendment fails
      and the separate memo supplies the reduction.
    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/document-edits/reassign-and-edit.integration.spec.js#it
      answers the invoice at revision 2 with the line added after the last, the
      line repriced and the totals re-derived;
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      is refused batch_not_open once the batch is posted;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-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-02;
      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-03;
      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
    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-0183, 0190, 0205.
  - >-
    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-067'
  validation: 'gap: FND-ACC-TRX-067'
  permission: covered
  edge: 'gap: FND-ACC-TRX-067'
  failure: covered
  boundary: covered
  concurrency: 'gap: FND-ACC-TRX-067'
  invariant: covered
  interaction: covered
coverage_notes:
  validation: >-
    No dedicated validation scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
  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.
  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-002-11
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      answers the invoice at revision 2 with the line added after the last, the
      line repriced and the totals re-derived;
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      is refused batch_not_open once the batch is posted;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-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-02;
      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-03;
      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
  - to: CAP-ACC-TRX-015
    scenarios:
      - ATS-ACC-TRX-002-11
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      answers the invoice at revision 2 with the line added after the last, the
      line repriced and the totals re-derived;
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      is refused batch_not_open once the batch is posted;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-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-02;
      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-03;
      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
transition_coverage:
  - state_model: STATE-ACC-TRX-001
    transition: 1
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/create-draft.integration.spec.js#it
        refuses an inactive product (product_not_sellable)
  - state_model: STATE-ACC-TRX-001
    transition: 2
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/update-draft.integration.spec.js#it
        refuses an update at a version the draft has moved past (stale)
  - state_model: STATE-ACC-TRX-001
    transition: 3
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/issue.integration.spec.js#it
        gives it no batch, no accounting date and no recognition (FC-06)
  - state_model: STATE-ACC-TRX-001
    transition: 4
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/issue.integration.spec.js#it
        refuses the issue when the unit has no assignment rules
        (batch_required), the draft unchanged
  - state_model: STATE-ACC-TRX-001
    transition: 5
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/issue.integration.spec.js#it
        is paid at once, its line with it
  - state_model: STATE-ACC-TRX-001
    transition: 6
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:docs/architecture/accounting-2.0/05-lifecycles.md#1.
        The invoice
  - state_model: STATE-ACC-TRX-001
    transition: 7
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/issue.integration.spec.js#it
        gives it no batch, no accounting date and no recognition (FC-06)
  - state_model: STATE-ACC-TRX-001
    transition: 8
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/receive-offline.integration.spec.js#it
        converts an unconverted pro forma the first payment names, in the
        payment’s batch, and pays it (Commerce’s first payment makes it real)
  - state_model: STATE-ACC-TRX-001
    transition: 9
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/issue.integration.spec.js#it
        gives it no batch, no accounting date and no recognition (FC-06)
  - state_model: STATE-ACC-TRX-001
    transition: 10
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        answers the invoice at revision 2 with the line added after the last,
        the line repriced and the totals re-derived
  - state_model: STATE-ACC-TRX-001
    transition: 11
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/credits/credits.integration.spec.js#it
        raises the line’s amount_paid: a line settled by store credit reads open
        until fully paid, then paid
  - state_model: STATE-ACC-TRX-001
    transition: 12
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        reverses the live allocation so the line owes again, and the payment
        item’s facts sum to zero (FC-16)
  - state_model: STATE-ACC-TRX-001
    transition: 13
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        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
  - state_model: STATE-ACC-TRX-001
    transition: 14
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.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-001
    transition: 15
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it
        makes the whole line written_off and keeps the partly written-off line
        and the invoice open
  - state_model: STATE-ACC-TRX-001
    transition: 16
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it
        answers the reversal: a second write-off, numbered next, its lines
        negating the first’s
  - state_model: STATE-ACC-TRX-001
    transition: 17
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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/invoices/invoice-drafts.ts;
        services-accounting:modules/transactions/services/invoices/invoice-issue.ts;
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts;
        services-accounting:modules/transactions/services/invoices/invoice-amendments.ts;
        services-accounting:modules/transactions/db/invoices.table.ts;
        services-accounting:modules/transactions/db/invoice-lines.table.ts;
        services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
        appends an invoice_voided fact per line for minus the line’s balance,
        dated today
permission_coverage:
  - key: accounting.invoices.adjust
    where_checked: api
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#CAP-ACC-TRX-002
  - key: accounting.invoices.update
    where_checked: api
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#CAP-ACC-TRX-002
  - key: accounting.invoices.void
    where_checked: api
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    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-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#CAP-ACC-TRX-002
rule_coverage:
  - rule: BR-CAP-ACC-TRX-002-01
    scenarios:
      - ATS-ACC-TRX-002-01
      - ATS-ACC-TRX-002-11
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      answers the invoice at revision 2 with the line added after the last, the
      line repriced and the totals re-derived
  - rule: BR-CAP-ACC-TRX-002-02
    scenarios:
      - ATS-ACC-TRX-002-02
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      removes a line with nothing applied at the next revision, and refuses
      removing or repricing the paid line
  - rule: BR-CAP-ACC-TRX-002-03
    scenarios:
      - ATS-ACC-TRX-002-01
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      writes the amended facts for the delta, the originals untouched, and the
      amend event with the delta
  - rule: BR-CAP-ACC-TRX-002-04
    scenarios:
      - ATS-ACC-TRX-002-03
      - ATS-ACC-TRX-002-04
      - ATS-ACC-TRX-002-11
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      is refused batch_not_open once the batch is posted
  - rule: BR-CAP-ACC-TRX-002-05
    scenarios:
      - ATS-ACC-TRX-002-05
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
      answers the memo, the terms and the explicit due date, which wins over the
      terms’ own
  - rule: BR-CAP-ACC-TRX-002-06
    scenarios:
      - ATS-ACC-TRX-002-06
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it
      leaves the memo, the terms, the due date and the version as they were
  - rule: BR-CAP-ACC-TRX-002-07
    scenarios:
      - ATS-ACC-TRX-002-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      moves the invoice date of an issued, unposted invoice, re-dating its
      facts; refuses a date after its due date
  - rule: BR-CAP-ACC-TRX-002-08
    scenarios:
      - ATS-ACC-TRX-002-08
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
      is refused invoice_has_money_applied, the invoice unchanged
  - rule: BR-CAP-ACC-TRX-002-09
    scenarios:
      - ATS-ACC-TRX-002-08
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
      appends an invoice_voided fact per line for minus the line’s balance,
      dated today
  - rule: BR-CAP-ACC-TRX-002-10
    scenarios:
      - ATS-ACC-TRX-002-09
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it
      refuses the void of the issued invoice, which stays open
  - rule: BR-CAP-ACC-TRX-002-11
    scenarios:
      - ATS-ACC-TRX-002-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it
      is refused POST /invoices/{tenantId}/{id}/void without
      accounting.invoices.void (403)
executable_gaps:
  - scenario: ATS-ACC-TRX-002-04
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    evidence:
      - 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4'
  - scenario: ATS-ACC-TRX-002-11
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    evidence:
      - >-
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        answers the invoice at revision 2 with the line added after the last,
        the line repriced and the totals re-derived;
        services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
        is refused batch_not_open once the batch is posted;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002
invariant_coverage:
  - invariant: INV-DOM-ACC-TRX-001-10
    scenarios:
      - ATS-ACC-TRX-002-02
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it
      removes a line with nothing applied at the next revision, and refuses
      removing or repricing the paid line
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
  - invariant: INV-DOM-ACC-TRX-001-11
    gap: FND-ACC-TRX-067
    provenance: unknown
    source: FND-ACC-TRX-067
    evidence:
      - >-
        services-accounting:modules/transactions/services/invoices/invoice-changes.ts:changeHeader
    note: >-
      The complete invariant has no exact assertion binding in this
      specification; component evidence does not close the gap.
  - invariant: INV-DOM-ACC-TRX-001-12
    scenarios:
      - ATS-ACC-TRX-002-08
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it
      is refused invoice_has_money_applied, the invoice unchanged
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
---

# Correct issued bills before posting: Capability Test Specification

## Coverage

The structured coverage map distinguishes specified examples from missing category coverage. Every required rule names its proving scenarios in the structured rule coverage register. A scenario’s executable binding applies only to the cited assertions; the transition and permission registers retain the combinations that still need explicit proof.

## Interactions With Related Capabilities

Amend a live 80.00 bill in an open batch, move it to another eligible batch, then attempt amendment after that batch posts and record a credit memo instead.

The unposted revision and move retain one bill; the later amendment fails and the separate memo supplies the reduction. The complete chain remains proposed until one executable run proves its combined outcomes.
