---
id: ATS-ACC-TRX-005
scope: CAP-ACC-TRX-005
product_area: accounting
module: transactions
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
scenarios:
  - id: ATS-ACC-TRX-005-01
    title: Rendering selects the applicable document design
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-01
    preconditions: >-
      Examples use invoice, unit and default templates plus inactive and
      wrong-kind choices.
    steps:
      - do: Render each invoice.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          is the invoice’s own template over its unit’s
    expected: The precedence selects the proper design and invalid named choices fail.
    negative: false
    data_needs: Valid and invalid template records.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
        is the invoice’s own template over its unit’s
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
        is the business unit’s template when the invoice names none
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
        is the built-in invoice when neither the invoice nor its unit names one
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
        refuses an inactive template in 1.0’s words
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
        refuses a template of another kind: 400
      - TST-ACC-TRX-060
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
      is the invoice’s own template over its unit’s
    category: rule
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js
        assertion: it is the invoice’s own template over its unit’s
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          is the invoice’s own template over its unit’s
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js
        assertion: it is the business unit’s template when the invoice names none
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          is the business unit’s template when the invoice names none
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js
        assertion: >-
          it is the built-in invoice when neither the invoice nor its unit names
          one
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          is the built-in invoice when neither the invoice nor its unit names
          one
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js
        assertion: it refuses an inactive template in 1.0’s words
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          refuses an inactive template in 1.0’s words
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js
        assertion: 'it refuses a template of another kind: 400'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
          refuses a template of another kind: 400
    binding_review: []
  - id: ATS-ACC-TRX-005-02
    title: Invoice output is generated on request
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-02
    preconditions: An invoice has issued.
    steps:
      - do: Request HTML and an unsupported format.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          refuses a format other than html: 400
    expected: >-
      Fresh HTML contains the document data; unsupported format fails without a
      stored rendering.
    negative: false
    data_needs: A real invoice with identifiable content.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        renders the invoice with its template, and its e-mail
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        refuses a format other than html: 400
      - TST-ACC-TRX-007
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
      refuses a format other than html: 400
    category: invariant
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js
        assertion: 'it renders the invoice with its template, and its e-mail'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          renders the invoice with its template, and its e-mail
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js
        assertion: 'it refuses a format other than html: 400'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          refuses a format other than html: 400
    binding_review: []
  - id: ATS-ACC-TRX-005-03
    title: Sending requires an issued bill and recipients
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-03
      - BR-CAP-ACC-TRX-005-04
    preconditions: >-
      Draft, addressless contact, organization and addressed contact examples
      exist.
    steps:
      - do: >-
          Attempt each send, supply explicit recipients, then submit eleven or
          malformed addresses.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses a draft: it has no number and no receivable
    expected: >-
      Ineligible sends fail; explicit recipients replace the default and invalid
      recipient lists fail.
    negative: true
    data_needs: Contacts with varied e-mail availability.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses a draft: it has no number and no receivable
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses an invoice whose bill-to contact has no address, in 1.0’s words
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses an organization’s invoice with no address named
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses more than ten addresses: 400
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        goes to the addresses the caller names instead, canonical, without the
        contact as a recipient
      - TST-ACC-TRX-051
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses a draft: it has no number and no receivable
    category: validation
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: 'it refuses a draft: it has no number and no receivable'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses a draft: it has no number and no receivable
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: >-
          it refuses an invoice whose bill-to contact has no address, in 1.0’s
          words
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses an invoice whose bill-to contact has no address, in 1.0’s
          words
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: it refuses an organization’s invoice with no address named
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses an organization’s invoice with no address named
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: 'it refuses more than ten addresses: 400'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses more than ten addresses: 400
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: >-
          it goes to the addresses the caller names instead, canonical, without
          the contact as a recipient
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          goes to the addresses the caller names instead, canonical, without the
          contact as a recipient
    binding_review: []
  - id: ATS-ACC-TRX-005-04
    title: Communication retry retains one submission
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-05
    preconditions: A sendable invoice exists.
    steps:
      - do: 'Send without a key, then repeat a keyed send.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses an e-mail without an idempotency key: 400
          idempotency_key_required
    expected: Missing identity fails and repetition retains one submission reference.
    negative: false
    data_needs: A communication-capable invoice.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses an e-mail without an idempotency key: 400
        idempotency_key_required
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        answers the request’s derived id, the same for the repeated key, and one
        pointer row names it
      - TST-ACC-TRX-051
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses an e-mail without an idempotency key: 400 idempotency_key_required
    category: edge
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: >-
          it refuses an e-mail without an idempotency key: 400
          idempotency_key_required
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses an e-mail without an idempotency key: 400
          idempotency_key_required
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: >-
          it answers the request’s derived id, the same for the repeated key,
          and one pointer row names it
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          answers the request’s derived id, the same for the repeated key, and
          one pointer row names it
    binding_review: []
  - id: ATS-ACC-TRX-005-05
    title: Submission failure rolls back delivery evidence
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-06
    preconditions: The communication sender throws during submission.
    steps:
      - do: Request invoice delivery.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          writes nothing, not even the event, when the sender’s statement fails:
          the command’s transaction rolls back
    expected: Neither the communication request nor e-mail event remains.
    negative: true
    data_needs: A failing sender test double.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        writes nothing, not even the event, when the sender’s statement fails:
        the command’s transaction rolls back
      - TST-ACC-TRX-051
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      writes nothing, not even the event, when the sender’s statement fails: the
      command’s transaction rolls back
    category: failure
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js
        assertion: >-
          it writes nothing, not even the event, when the sender’s statement
          fails: the command’s transaction rolls back
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          writes nothing, not even the event, when the sender’s statement fails:
          the command’s transaction rolls back
    binding_review: []
  - id: ATS-ACC-TRX-005-06
    title: Viewing and delivery use separate authorities
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-07
    preconditions: One identity reads and another can send.
    steps:
      - do: Request document and e-mail through each identity.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          refuses the e-mail to a principal holding only
          accounting.invoices.read: 403, submitting nothing
    expected: Both can view but only the sender can deliver.
    negative: true
    data_needs: Read and send personas.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        renders for a principal holding only accounting.invoices.read
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        refuses the e-mail to a principal holding only accounting.invoices.read:
        403, submitting nothing
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        sends the e-mail for a principal holding accounting.invoices.email
      - TST-ACC-TRX-007
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
      refuses the e-mail to a principal holding only accounting.invoices.read:
      403, submitting nothing
    category: permission
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js
        assertion: it renders for a principal holding only accounting.invoices.read
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          renders for a principal holding only accounting.invoices.read
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js
        assertion: >-
          it refuses the e-mail to a principal holding only
          accounting.invoices.read: 403, submitting nothing
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          refuses the e-mail to a principal holding only
          accounting.invoices.read: 403, submitting nothing
      - file: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js
        assertion: it sends the e-mail for a principal holding accounting.invoices.email
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          sends the e-mail for a principal holding accounting.invoices.email
    binding_review: []
  - id: ATS-ACC-TRX-005-07
    title: Rendering follows eligible amendment
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-02
      - BR-CAP-ACC-TRX-005-05
      - BR-CAP-ACC-TRX-005-06
      - BR-CAP-ACC-TRX-002-01
      - BR-CAP-ACC-TRX-002-03
    exercises:
      - CAP-ACC-TRX-005
      - CAP-ACC-TRX-002
    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: >-
          Render an issued 80.00 bill, amend an unpaid line to 100.00, then
          render and send the changed bill under a fresh delivery key.
        provenance: proposed
        source: >-
          services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
          refuses a format other than html: 400;
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses an e-mail without an idempotency key: 400
          idempotency_key_required;
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          writes nothing, not even the event, when the sender’s statement fails:
          the command’s transaction rolls back;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-016-e-mail-an-invoice.md#WF-ACC-TRX-016;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-02;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-05;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-06;
          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-03
    expected: >-
      The later document shows the revised amount and revision; delivery
      submission retains the current rendering without replacing the earlier
      financial history.
    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/e2e/invoice-documents.e2e.spec.js#it
      refuses a format other than html: 400;
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses an e-mail without an idempotency key: 400
      idempotency_key_required;
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      writes nothing, not even the event, when the sender’s statement fails: the
      command’s transaction rolls back;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-016-e-mail-an-invoice.md#WF-ACC-TRX-016;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-06;
      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-03
    test_bindings: []
    binding_review: []
  - id: ATS-ACC-TRX-005-08
    title: Recipient count accepts the limit and rejects one more
    category: boundary
    level: api
    proves:
      - BR-CAP-ACC-TRX-005-04
    preconditions: >-
      An issued bill has ten distinct valid explicit recipients and a working
      sender.
    steps:
      - do: >-
          Send to ten recipients, then submit a separately keyed request naming
          eleven.
        provenance: proposed
        source: >-
          services-accounting:modules/transactions/services/invoices/invoice-emails.ts:emailInvoice;
          services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
          refuses more than ten addresses: 400
    expected: >-
      The first request supplies one communication for the ten recipients; the
      second fails before submission.
    negative: true
    data_needs: >-
      Branch-owned records in one configured workspace, valid accounting context
      and controlled requests at the stated boundary.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/services/invoices/invoice-emails.ts:emailInvoice;
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses more than ten addresses: 400
    test_bindings: []
    binding_review: []
evidence:
  - >-
    services-accounting at f47cb263875bbc0c5640fba7dae6785ec32695f8: the test
    files named in bound_to.
  - >-
    rhythm-v2-docs:specs/accounting/transactions/design: related workflows,
    domain invariants and state transitions examined for the back-fill.
coverage:
  rule: covered
  transition: not-applicable
  validation: covered
  permission: covered
  edge: covered
  failure: covered
  boundary: covered
  concurrency: 'gap: FND-ACC-TRX-070'
  invariant: covered
  interaction: covered
coverage_notes:
  transition: >-
    Document rendering and communication submission do not own a
    financial-record lifecycle; delivery failure and retry have separate
    scenarios.
  concurrency: >-
    No dedicated concurrency scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
interaction_coverage:
  - to: CAP-ACC-TRX-002
    scenarios:
      - ATS-ACC-TRX-005-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
      refuses a format other than html: 400;
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses an e-mail without an idempotency key: 400
      idempotency_key_required;
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      writes nothing, not even the event, when the sender’s statement fails: the
      command’s transaction rolls back;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-016-e-mail-an-invoice.md#WF-ACC-TRX-016;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-005-send-a-customer-their-invoice.md#BR-CAP-ACC-TRX-005-06;
      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-03
transition_coverage: []
permission_coverage:
  - key: accounting.invoices.read
    where_checked: api
    gap: FND-ACC-TRX-070
    provenance: unknown
    source: FND-ACC-TRX-070
    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-005-send-a-customer-their-invoice.md#CAP-ACC-TRX-005
  - key: accounting.invoices.email
    where_checked: api
    gap: FND-ACC-TRX-070
    provenance: unknown
    source: FND-ACC-TRX-070
    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-005-send-a-customer-their-invoice.md#CAP-ACC-TRX-005
rule_coverage:
  - rule: BR-CAP-ACC-TRX-005-01
    scenarios:
      - ATS-ACC-TRX-005-01
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/render-invoice.integration.spec.js#it
      is the invoice’s own template over its unit’s
  - rule: BR-CAP-ACC-TRX-005-02
    scenarios:
      - ATS-ACC-TRX-005-02
      - ATS-ACC-TRX-005-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
      refuses a format other than html: 400
  - rule: BR-CAP-ACC-TRX-005-03
    scenarios:
      - ATS-ACC-TRX-005-03
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses a draft: it has no number and no receivable
  - rule: BR-CAP-ACC-TRX-005-04
    scenarios:
      - ATS-ACC-TRX-005-03
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses more than ten addresses: 400
  - rule: BR-CAP-ACC-TRX-005-05
    scenarios:
      - ATS-ACC-TRX-005-04
      - ATS-ACC-TRX-005-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      refuses an e-mail without an idempotency key: 400 idempotency_key_required
  - rule: BR-CAP-ACC-TRX-005-06
    scenarios:
      - ATS-ACC-TRX-005-05
      - ATS-ACC-TRX-005-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
      writes nothing, not even the event, when the sender’s statement fails: the
      command’s transaction rolls back
  - rule: BR-CAP-ACC-TRX-005-07
    scenarios:
      - ATS-ACC-TRX-005-06
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
      refuses the e-mail to a principal holding only accounting.invoices.read:
      403, submitting nothing
executable_gaps:
  - scenario: ATS-ACC-TRX-005-07
    gap: FND-ACC-TRX-070
    provenance: unknown
    source: FND-ACC-TRX-070
    evidence:
      - >-
        services-accounting:modules/transactions/tests/e2e/invoice-documents.e2e.spec.js#it
        refuses a format other than html: 400;
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses an e-mail without an idempotency key: 400
        idempotency_key_required;
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        writes nothing, not even the event, when the sender’s statement fails:
        the command’s transaction rolls back;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-016-e-mail-an-invoice.md#WF-ACC-TRX-016
  - scenario: ATS-ACC-TRX-005-08
    gap: FND-ACC-TRX-070
    provenance: unknown
    source: FND-ACC-TRX-070
    evidence:
      - >-
        services-accounting:modules/transactions/services/invoices/invoice-emails.ts:emailInvoice;
        services-accounting:modules/transactions/tests/integration/services/invoices/email-invoice.integration.spec.js#it
        refuses more than ten addresses: 400
invariant_coverage: []
---

# Prepare and deliver invoice documents: 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-005-01` | `ATS-ACC-TRX-005-01` |
| `BR-CAP-ACC-TRX-005-02` | `ATS-ACC-TRX-005-02`, `ATS-ACC-TRX-005-07` |
| `BR-CAP-ACC-TRX-005-03` | `ATS-ACC-TRX-005-03` |
| `BR-CAP-ACC-TRX-005-04` | `ATS-ACC-TRX-005-03`, `ATS-ACC-TRX-005-08` |
| `BR-CAP-ACC-TRX-005-05` | `ATS-ACC-TRX-005-04`, `ATS-ACC-TRX-005-07` |
| `BR-CAP-ACC-TRX-005-06` | `ATS-ACC-TRX-005-05`, `ATS-ACC-TRX-005-07` |
| `BR-CAP-ACC-TRX-005-07` | `ATS-ACC-TRX-005-06` |

## Interactions With Related Capabilities

Render an issued 80.00 bill, amend an unpaid line to 100.00, then render and send the changed bill under a fresh delivery key.

The later document shows the revised amount and revision; delivery submission retains the current rendering without replacing the earlier financial history. The complete chain remains proposed until one executable run proves its combined outcomes.
