---
id: TST-ACC-TRX-055
title: Issue tax 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/issue-tax.integration.spec.js
implements:
  - ATS-ACC-TRX-001-13
implements_parts:
  - scenario: ATS-ACC-TRX-001-13
    assertion: >-
      it writes one tax line per rate on the dues line, naming the zone and the
      rate and no account
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/issue-tax.integration.spec.js#it
      writes one tax line per rate on the dues line, naming the zone and the
      rate and no account
  - scenario: ATS-ACC-TRX-001-13
    assertion: >-
      it freezes the tax lines with the invoice: the application role can
      neither change nor delete one
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/issue-tax.integration.spec.js#it
      freezes the tax lines with the invoice: the application role can neither
      change nor delete one
  - scenario: ATS-ACC-TRX-001-13
    assertion: >-
      it carries the exemption of an organization CRM says is tax exempt: no tax
      lines, is_tax_exempt true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/issue-tax.integration.spec.js#it
      carries the exemption of an organization CRM says is tax exempt: no tax
      lines, is_tax_exempt true
  - scenario: ATS-ACC-TRX-001-13
    assertion: >-
      it refuses the issue of a staff invoice to a party with no address (D-T4),
      naming the code, and writes nothing
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/issue-tax.integration.spec.js#it
      refuses the issue of a staff invoice to a party with no address (D-T4),
      naming the code, and writes nothing
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/issue-tax.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/issue-tax.integration.spec.js
    assertion_titles:
      - the tax of an invoice at issue (integration)
      - >-
        an invoice billed to the New York Society: dues (standard) 60.00 and
        gala (no class) 40.00
      - >-
        snapshots the bill-to’s preferred address on the draft, and taxes
        nothing until the issue
      - >-
        writes one tax line per rate on the dues line, naming the zone and the
        rate and no account
      - 'taxes nothing of the gala line, whose product has no class'
      - >-
        sets each line’s tax and total, and the header’s tax total, total and
        balance due, from the tax lines
      - records the receivable of each line with its tax inside
      - >-
        freezes the tax lines with the invoice: the application role can neither
        change nor delete one
      - >-
        admits the posting’s one write of the account it resolved (gl_account_id
        set once from null) and nothing more
      - >-
        answers the invoice’s tax in the Financial Transactions dataset, in
        major units
      - the parties and the addresses
      - taxes an invoice billed to a contact at the contact’s preferred address
      - >-
        refuses the issue of a staff invoice to a party with no address (D-T4),
        naming the code, and writes nothing
      - >-
        refuses an invoice of the portal or the import with no order and no
        address, whatever its metadata
      - >-
        issues an invoice billed from a Commerce order with no address untaxed,
        as before: Commerce refuses such an order at checkout
      - 'warns of nothing on a taxed invoice, nor on an exempt one'
      - >-
        warns of nothing when the tenant has no active tax zone, whatever the
        address
      - >-
        carries the exemption of an organization CRM says is tax exempt: no tax
        lines, is_tax_exempt true
      - refreshes the billing address when a draft is re-billed to another party
      - 'taxes a pro forma at its issue, so a checkout’s invoice carries its tax'
      - >-
        taxes a line under the class the draft names over the product’s: the
        reduced class by the city rate alone
      - no account needed to issue
      - >-
        issues a taxed invoice whose rate has no account anywhere: the account
        is the posting’s to resolve (Andrew, 2026-10-18)
      - >-
        a debit memo adding a taxed line to an invoice billed to a party with no
        address (D-T4)
      - >-
        refuses it even on a Commerce invoice, naming the code, and writes
        nothing: the invoice is not debited
    imports:
      - 'const { sql } = require(''drizzle-orm'');'
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { assignDefaultGlAccount, clearDefaultGlAccount } =
        require('../../../../../books/services/persistence/default-gl-accounts');
      - >-
        const { createDebitMemo } =
        require('../../../../services/change-memos/memo-commands');
      - >-
        const { createDraft, updateDraft } =
        require('../../../../services/invoices/invoice-drafts');
      - >-
        const { issueInvoice } =
        require('../../../../services/invoices/invoice-issue');
      - >-
        const { getInvoice } =
        require('../../../../services/invoices/invoice-reads');
      - '} = require(''../../invoices-fixtures'');'
      - '} = require(''../../tax-fixtures'');'
      - "\t\t\tworld.require();"
      - "\t\t\tconst { drafted } = issued.require();"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\texpect(issued.require().issued.lines[1].tax_lines).to.deep.equal([]);"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\tconst { issued: invoice } = issued.require();"
      - "\t\t\tworld.require();"
      - "\t\t\tworld.require();"
    test_double_declarations:
      - ' * Real: the commands through their one transaction, the tax, configuration and product persistence, the CRM stand-in, the'
---

# Issue tax 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 issue freezes applicable tax treatment. 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.
