---
id: TST-ACC-TRX-066
title: Void suite
kind: integration
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/transactions/tests/integration/services/invoices/void.integration.spec.js
implements:
  - ATS-ACC-TRX-002-08
implements_parts:
  - scenario: ATS-ACC-TRX-002-08
    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
  - scenario: ATS-ACC-TRX-002-08
    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
  - scenario: ATS-ACC-TRX-002-08
    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
  - scenario: ATS-ACC-TRX-002-08
    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
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Suite-marked records in the prepared local test database; fixture teardown
  removes owned records.
provenance: test
source: >-
  services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js
    assertion_titles:
      - voidInvoice (integration)
      - a draft
      - 'becomes void with the reason, the caller and the instant'
      - makes its lines void
      - appends no fact
      - records the void document event with the reason
      - an issued invoice with nothing applied
      - becomes void with the reason
      - makes its lines void
      - >-
        appends an invoice_voided fact per line for minus the line’s balance,
        dated today
      - 'records the void document event, open to void'
      - 'refuses voiding it again, the invoice unchanged'
      - an issued invoice with a credit memo line applied
      - 'is refused invoice_has_money_applied, the invoice unchanged'
      - an issued invoice with a write-off line applied
      - 'is refused invoice_has_money_applied, the invoice unchanged'
    imports:
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { TEST_NOW } =
        require('@rhythmsoftware/macroservice-testing/execution-context');
      - >-
        const { createDraft } =
        require('../../../../services/invoices/invoice-drafts');
      - >-
        const { issueInvoice } =
        require('../../../../services/invoices/invoice-issue');
      - >-
        const { voidInvoice } =
        require('../../../../services/invoices/invoice-changes');
      - >-
        const { getInvoice } =
        require('../../../../services/invoices/invoice-reads');
      - '} = require(''../../invoices-fixtures'');'
      - "\t\t\tworld.require();"
      - "\t\t\tconst voided = voidingDraft.require();"
      - "\t\t\texpect(voidingDraft.require().lines.map((line) => line.status)).to.deep.equal(['void', 'void']);"
      - "\t\t\texpect(await receivableEventRowsOf(TENANT, voidingDraft.require().id)).to.deep.equal([]);"
      - "\t\t\tconst events = await documentEventRowsOf(TENANT, voidingDraft.require().id);"
      - "\t\t\tworld.require();"
      - "\t\t\tconst { voided } = voidingIssued.require();"
      - "\t\t\tconst { voided } = voidingIssued.require();"
      - "\t\t\tconst { invoice } = voidingIssued.require();"
      - "\t\t\tconst { invoice } = voidingIssued.require();"
      - "\t\t\tconst { voided } = voidingIssued.require();"
      - "\t\t\tworld.require();"
      - "\t\t\tworld.require();"
    test_double_declarations: []
---

# Void suite

## Verification Boundary

The suite exercises transaction commands and database protections in the local prepared test environment. Registration records the existing executable file; it does not report a run or establish product approval.

## What This Suite Proves

Its cited assertions contribute evidence for void requires an untouched financial position. The structured assertion bindings identify which parts of combined scenarios it executes.

## What It Does Not Prove

Local commands and route invocations do not establish deployed routing, live processor guarantees or the complete staff browser experience. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The suite uses the imported commands, route handlers or persistence code against the local test database. Fixture helpers supply accounting context; any stepped clock, dummy processor or substituted external client is retained in the evidence declarations.

## Must Not Be Doubled

The command or persistence behavior under assertion and its relevant database protections must remain real. Substituting the final financial result removes evidence of transactional effects.
