---
id: TST-ACC-BAT-102
title: Batch integration gl resolution at posting
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/gl-resolution-at-posting.integration.spec.js
implements:
  - ATS-ACC-BAT-007-06
  - ATS-ACC-BAT-014-01
  - ATS-ACC-BAT-014-02
  - ATS-ACC-BAT-014-03
  - ATS-ACC-BAT-014-05
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-007-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#refuses
      voiding an invoice of a posted batch (batch_not_open), the invoice
      unchanged
  - scenario: ATS-ACC-BAT-007-06
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#voids
      an invoice of an unposted batch with nothing applied
  - scenario: ATS-ACC-BAT-014-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#issues
      the invoice and creates the memos and the write-off with no GL account,
      default or setup anywhere
  - scenario: ATS-ACC-BAT-014-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts
      the invoice to the resolved accounts: the receivable from the unit’s
      default, the revenue from the product’s setup, the discounted line net of
      its discount
  - scenario: ATS-ACC-BAT-014-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts
      the debit memo’s added line (a product with no setup) to the unit’s
      defaults
  - scenario: ATS-ACC-BAT-014-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails
      the batch’s validation with an error naming the invoice, the missing
      accounts receivable account, the product’s setup and the unit’s default
  - scenario: ATS-ACC-BAT-014-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails
      the batch naming the gala invoice, its line and the missing revenue
      purpose, the dues invoice unnamed
  - scenario: ATS-ACC-BAT-014-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#leaves
      nothing partially posted: no entry, no snapshot, the documents issued and
      unposted
  - scenario: ATS-ACC-BAT-014-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#writes
      the posting’s snapshot on every posted line: the accounts it posted to,
      the method and the instant
  - scenario: ATS-ACC-BAT-014-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts
      the credit memo and the write-off to the accounts the invoice’s entry
      used, the write-off’s debit to the product’s write-off account
  - scenario: ATS-ACC-BAT-014-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#alters
      neither October’s posted entries nor its snapshot
  - scenario: ATS-ACC-BAT-014-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#posts
      the later batch to the configuration as it stands then
  - scenario: ATS-ACC-BAT-014-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#preserves
      the discount in the posted snapshot: the gross, the discount and the net
      on the line, the discount product’s revenue account and the net-of-revenue
      method
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.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/gl-resolution-at-posting.integration.spec.js#suite
      header
    note: >-
      Real: the integration database, the invoice, memo and write-off commands,
      the configuration and product persistence, the
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#suite
      header
    note: >-
      native posting engine (`post-batches`, `unpost-batches`,
      `preview-batches`). Doubled: nothing.
unbound_scope: null
---

# Batch integration gl resolution at posting

## 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

Issuance precedes account configuration, posting resolves current destinations and later corrections reuse recorded snapshots. 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.
