---
id: TST-ACC-BAT-110
title: Batch integration rebuilt tax
kind: integration
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js
implements:
  - ATS-ACC-BAT-014-06
  - ATS-ACC-BAT-015-03
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  The suite owns its test workspace or fixed integration fixtures in the
  prepared local database.
assertion_sources:
  - scenario: ATS-ACC-BAT-014-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#writes
      the account each tax line was credited to back on the tax line as the
      posted snapshot (gl-at-posting), the invoice’s and the memos’
  - scenario: ATS-ACC-BAT-014-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#puts
      the batch in error naming the rate and the unit when neither the rate nor
      the unit names a tax payable account, writing no entry
  - scenario: ATS-ACC-BAT-014-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts
      the same invoice once the unit names its default again, the City Tax lines
      credited to it
  - scenario: ATS-ACC-BAT-015-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts
      the invoice per line: the receivable debited the total with the tax,
      revenue credited the net, and a tax credit per tax line to its account
  - scenario: ATS-ACC-BAT-015-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts
      the credit memo with the tax it reverses debited to the tax accounts,
      revenue debited the net alone
  - scenario: ATS-ACC-BAT-015-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts
      the debit memo with the added line’s tax credited to the tax accounts,
      revenue credited the amount requested
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js
    note: >-
      The executable file is inspected at the pinned revision; duration is an
      unmeasured planning estimate.
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#suite
      header
    note: >-
      Real: the integration database, the invoice and memo commands, the native
      posting engine and the persistence services.
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#suite
      header
    note: 'Doubled: nothing.'
unbound_scope: null
---

# Batch integration rebuilt tax

## Verification Boundary

This suite exercises the imported batch services or storage against the prepared local database. It does not imply that a deployed workflow is contacted.

## What This Suite Proves

Invoice and memo tax movements, payable-account fallback, line snapshots and balanced totals are checked together. The assertion anchors identify the supported portions of the bound scenarios.

## What It Does Not Prove

Local assertions do not establish deployment configuration, remote delivery guarantees, or unasserted lifecycle and concurrency paths.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised persistence or accounting functions are real. Controlled clocks, imported test fixtures and any suite-specific doubles delimit the asserted behavior.

## Must Not Be Doubled

The database constraints, transaction boundaries and exercised accounting functions must remain real when qualifying the asserted persistence or generation behavior.
