---
id: CAP-ACC-BAT-007
title: Place documents in eligible batches and protect posted work
feature: FEAT-ACC-BAT-01
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
- inventory CAP-ACC-BAT-004
- inventory RUL-ACC-BAT-013
- inventory RUL-ACC-BAT-015
- inventory RUL-ACC-BAT-016
- inventory RUL-ACC-BAT-066
- inventory RUL-ACC-BAT-067
- inventory RUL-ACC-BAT-069
- inventory RUL-ACC-BAT-071
- journey ACT-ACC-0539
- journey ACT-ACC-0552
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
- services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4
- services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-6
- services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7
- services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-14
purpose: Batch intake and posting safeguards keep document placement aligned with the owning unit and recorded ledger
  work.
outcomes:
- Issued documents enter eligible collections and posted documents retain intake protection.
concepts:
- CON-ACC-BAT-001
actors:
- ACT-ACC-012
- ACT-ACC-013
surfaces:
- console
- api
permissions:
- key: accounting.batches.update
  where_checked: console
  scope: tenant
rules:
- id: BR-CAP-ACC-BAT-007-01
  proved_by: [ATS-ACC-BAT-007-01, TST-ACC-BAT-026, TST-ACC-BAT-063, TST-ACC-BAT-074]
  statement: Document intake accepts only an Open or Error transaction batch belonging to the document’s business
    unit and refuses an ineligible batch.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
    an invoice, a credit memo and a write-off naming the system batch (a transaction batch only, batch_not_open)
  origin: none
- id: BR-CAP-ACC-BAT-007-02
  proved_by: [ATS-ACC-BAT-007-02, TST-ACC-BAT-025]
  statement: The API can place documents in an Error batch, while the console picker restricts its choices to Open
    batches.
  kind: policy
  enforced_at:
  - service
  - console
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/rules/batch-rules.ts:BATCH_ACCEPTING_STATUSES
  origin: none
- id: BR-CAP-ACC-BAT-007-03
  proved_by: [ATS-ACC-BAT-007-03, TST-ACC-BAT-031, TST-ACC-BAT-084]
  statement: Draft and pro forma invoices remain outside batches.
  kind: invariant
  enforced_at:
  - database
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#is
    refused a batch by the database, so no batch’s totals can count one
  origin: none
- id: BR-CAP-ACC-BAT-007-04
  proved_by: [ATS-ACC-BAT-007-04, ATS-ACC-BAT-007-10, ATS-ACC-BAT-013-18, TST-ACC-BAT-025, TST-ACC-BAT-105]
  statement: The database prevents moving a document into or out of a Posting, Posted or Downloaded batch.
  kind: invariant
  enforced_at:
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses,
    in the database, moving a document out of a posted batch (RHA05)
  origin: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-6
- id: BR-CAP-ACC-BAT-007-05
  proved_by: [ATS-ACC-BAT-007-04, ATS-ACC-BAT-007-11, ATS-ACC-BAT-007-12, ATS-ACC-BAT-016-10, TST-ACC-BAT-025, TST-ACC-BAT-105]
  statement: Before posting, staff can reassign a document between eligible Open batches of its unit, with batch-update
    permission required by the console.
  kind: policy
  enforced_at:
  - service
  - console
  must_prove: true
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
  origin: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-6
- id: BR-CAP-ACC-BAT-007-06
  proved_by: [ATS-ACC-BAT-007-05, TST-ACC-BAT-106]
  statement: Posted batches reject new allocations, and an allocation without a batch is refused when its payment
    is posted and assignment provides no replacement.
  kind: invariant
  enforced_at:
  - database
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses,
    in the database, an allocation row into the posted batch (RHA05)
  origin: none
- id: BR-CAP-ACC-BAT-007-07
  proved_by: [ATS-ACC-BAT-007-06, TST-ACC-BAT-102, TST-ACC-BAT-105, TST-ACC-BAT-106]
  statement: Posted invoices, memos, payments and credits reject voiding and require an eligible correction document
    or controlled unposting instead.
  kind: lifecycle
  enforced_at:
  - service
  must_prove: true
  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
  origin: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4
- id: BR-CAP-ACC-BAT-007-08
  proved_by: [ATS-ACC-BAT-007-07, TST-ACC-BAT-031]
  statement: An issued invoice may be amended before posting subject to amendment and applied-money safeguards,
    while Posting and Posted batches reject that amendment.
  kind: lifecycle
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0552.spec.ts#ACT-ACC-0552
  origin: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-14
- id: BR-CAP-ACC-BAT-007-09
  proved_by: [ATS-ACC-BAT-007-08]
  statement: The recorded product decision permits date correction only before posting and keeps issued money, customer
    and payment method immutable.
  kind: invariant
  enforced_at: []
  must_prove: true
  provenance: documented
  source: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7
  origin: services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7
  note: The cited decision establishes intent; database enforcement of the cross-document date and money rule is
    outside the registered source scope and remains unverified in FND-ACC-BAT-035.
- id: BR-CAP-ACC-BAT-007-10
  proved_by: [ATS-ACC-BAT-007-01, ATS-ACC-BAT-007-09, ATS-ACC-BAT-011-11, TST-ACC-BAT-026, TST-ACC-BAT-063, TST-ACC-BAT-074]
  statement: Documents without an explicit batch use their unit’s assignment and must satisfy the same batch-intake
    checks.
  kind: policy
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
    the system batch as a default batch (BA-12)
  origin: none
scenarios:
- id: SC-CAP-ACC-BAT-007-01
  given: An invoice belongs to an Open receivables batch.
  when: Staff move it to another Open batch of the unit and post that target.
  then: The invoice posts with its target batch and cannot subsequently leave it.
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
- id: SC-CAP-ACC-BAT-007-02
  given: An invoice belongs to a Posted batch.
  when: Staff request a void.
  then: The batch restriction refuses the void, leaving correction to an eligible memo or unposting workflow.
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses
    the void of an invoice whose batch is posted, batch_not_open
edge_cases: []
constraints:
- Transactions owns document issuance, amendment and voiding; batch intake and posting protection are the concern
  here.
depends_on:
- CAP-ACC-BAT-011
related:
- CAP-ACC-BAT-013
- CAP-ACC-BAT-016
journeys:
- JNY-ACC-BAT-002
open_questions: []
evidence:
- 'Pinned services-accounting (f47cb263), examined sources: services/rules/batch-rules.ts (assertBatchCanAcceptTransaction,
  BATCH_ACCEPTING_STATUSES, defaultBatchOf), services/assignment/default-batch.ts; tests integration/services/close/system-batch-guard.integration.spec.js,
  integration/services/posting/rebuilt-documents.integration.spec.js, rebuilt-payments.integration.spec.js, gl-resolution-at-posting.integration.spec.js,
  integration/services/persistence/batch-totals.queries.integration.spec.js, e2e/system-batches.e2e.spec.js; docs/architecture/accounting-2.0/02-decisions.md
  (A-4, A-6, A-7, A-14). The document tables'' triggers are the Transactions module''s and were named, not read.'
- 'Pinned react-console (baf6dae3), examined sources: components/accounting/batches/batch-detail-tabs.tsx (Move
  to Another Batch); journeys ACT-ACC-0538, 0552.'
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-DAT-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005]
exercised_by: [FAS-ACC-BAT-01-02, FAS-ACC-BAT-01-04, FAS-ACC-BAT-01-05]
suites: [TST-ACC-BAT-025, TST-ACC-BAT-026, TST-ACC-BAT-031, TST-ACC-BAT-063, TST-ACC-BAT-074, TST-ACC-BAT-084, TST-ACC-BAT-102, TST-ACC-BAT-105, TST-ACC-BAT-106]
---

# Place documents in eligible batches and protect posted work

## Purpose

Batch intake and posting safeguards keep document placement aligned with the owning unit and recorded ledger work.

## How It Works

Transaction workflows provide a batch explicitly or obtain one through assignment. The intake check verifies the batch’s unit, type and working state. Staff can move eligible documents before posting. The console and API differ in whether an Error batch is selectable. Posting brings stronger database safeguards that protect placement even from direct writes. Corrections then use the permitted document workflow or controlled unposting.

## Relationships

- Prerequisite: Assign new documents to the appropriate batch stream, which addresses the connected batch work.
- Related outcome: Run and monitor a batch posting job, which addresses the connected batch work.
- Related outcome: Unpost a batch for correction and replacement posting, which addresses the connected batch work.
