---
id: CAP-ACC-BAT-003
title: Correct batch details before posting
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-001 (edit half)
- inventory RUL-ACC-BAT-005
- inventory RUL-ACC-BAT-007
- journey ACT-ACC-0505
- journey ACT-ACC-0506
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
- services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (job tp-batch-lifecycle,
  Andrew's UI brief of 2026-10-15)
- services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew, 2026-10-16)
purpose: Staff correct a workable batch while preserving details already used by posted accounting.
outcomes:
- Eligible corrections retain collection identity and recalculate affected fiscal placement.
concepts:
- CON-ACC-BAT-001
actors:
- ACT-ACC-012
- ACT-ACC-006
surfaces:
- console
- api
permissions:
- key: accounting.batches.update
  where_checked: api
  scope: tenant
- key: accounting.batches.update
  where_checked: console
  scope: tenant
rules:
- id: BR-CAP-ACC-BAT-003-01
  proved_by: [ATS-ACC-BAT-003-01, ATS-ACC-BAT-003-13, ATS-ACC-BAT-005-07, TST-ACC-BAT-060]
  statement: Details edits accept name, code, description, date, type, currency, automatic close, external reference
    and lock, while rejecting status changes through that editor.
  kind: validation
  enforced_at:
  - api
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/aws/api/batches.schemas.ts:batchPatchSchema
  origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's
    UI brief of 2026-10-15)
- id: BR-CAP-ACC-BAT-003-02
  proved_by: [ATS-ACC-BAT-003-02]
  statement: Neither the owning business unit nor the originating recurring-batch reference can be reassigned.
  kind: invariant
  enforced_at:
  - api
  - service
  - database
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/rules/batch-rules.ts:BATCH_FROZEN_FIELDS
  origin: none
- id: BR-CAP-ACC-BAT-003-03
  proved_by: [ATS-ACC-BAT-003-03, ATS-ACC-BAT-003-12, ATS-ACC-BAT-004-09, TST-ACC-BAT-085]
  statement: Posted, downloaded and archived batches reject ordinary field corrections but permit a request that
    changes only their lock.
  kind: lifecycle
  enforced_at:
  - service
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/persistence/batches.ts:changeBatch; services-accounting:modules/batches/services/rules/batch-rules.ts:assertBatchChangesAllowed
  origin: none
- id: BR-CAP-ACC-BAT-003-04
  proved_by: [ATS-ACC-BAT-003-04]
  statement: A batch currently posting rejects field changes until more than five minutes have passed since its
    last change.
  kind: lifecycle
  enforced_at:
  - service
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/rules/batch-rules.ts:assertBatchChangesAllowed
  origin: none
- id: BR-CAP-ACC-BAT-003-05
  proved_by: [ATS-ACC-BAT-003-05, TST-ACC-BAT-085]
  statement: Changing the date recalculates the fiscal period and rejects entry into a non-open period, while an
    edit that stays within its period does not require that period to remain open.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses
    moving an open batch’s date into a closed period (journey 0516/0520 setups: the rule stands)'
  origin: none
- id: BR-CAP-ACC-BAT-003-06
  proved_by: [ATS-ACC-BAT-001-11, ATS-ACC-BAT-003-06, ATS-ACC-BAT-003-11, TST-ACC-BAT-055, TST-ACC-BAT-085]
  statement: Renaming cannot take a name already held by another batch in the same unit.
  kind: validation
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses
    a rename to a name another batch of the unit has 409, name_in_use (D14)
  origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew,
    2026-10-16)
- id: BR-CAP-ACC-BAT-003-07
  proved_by: [ATS-ACC-BAT-003-07, TST-ACC-BAT-060, TST-ACC-BAT-085]
  statement: A supplied stale version prevents a details save, although the details API allows the version to be
    omitted.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/aws/api/batches.schemas.ts:batchPatchSchema; services-accounting:modules/batches/services/persistence/batches.ts:changeBatch
  origin: none
- id: BR-CAP-ACC-BAT-003-08
  proved_by: [ATS-ACC-BAT-003-08, TST-ACC-BAT-085]
  statement: An update lock blocks ordinary edits, and a caller with update permission can release it only in a
    separate request containing no other changes.
  kind: policy
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses
    an edit sent with the lock’s release
  origin: none
- id: BR-CAP-ACC-BAT-003-09
  proved_by: [ATS-ACC-BAT-003-09, TST-ACC-BAT-074]
  statement: An ordinary batch cannot be changed into a period-close system type.
  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
    changing an ordinary batch’s type to a system type, the batch unchanged
  origin: none
- id: BR-CAP-ACC-BAT-003-10
  proved_by: [ATS-ACC-BAT-003-10, TST-ACC-BAT-027]
  statement: Update permission controls details editing, and the console marks Edit Details unavailable with an
    explanation for a caller lacking it.
  kind: permission
  enforced_at:
  - api
  - console
  must_prove: true
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0540.spec.ts#ACT-ACC-0540
  origin: none
scenarios:
- id: SC-CAP-ACC-BAT-003-01
  given: A versioned editor is open when another caller closes and archives the batch.
  when: The editor saves against the earlier version.
  then: The stale save is refused, and a reloaded ordinary edit is also refused by archive protection.
  provenance: documented
  source: react-console:acceptance/accounting/journeys/batches-posting/ACT-ACC-0506.json
- id: SC-CAP-ACC-BAT-003-02
  given: An October batch has already posted.
  when: A caller changes its date to early November.
  then: The refused edit preserves the batch date and fiscal period.
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses
    moving the date of a posted batch, and the batch keeps its date and fiscal period (DEF-ACT-0502)
edge_cases: []
constraints: []
depends_on:
- CAP-ACC-BAT-001
related:
- CAP-ACC-BAT-004
- CAP-ACC-BAT-005
journeys: []
open_questions: []
evidence:
- 'Pinned services-accounting (f47cb263), examined sources: aws/api/batch-records.routes.ts (updateBatch), batches.schemas.ts
  (batchPatchSchema), services/persistence/batches.ts (updateBatch, changeBatch), services/rules/batch-rules.ts
  (assertBatchChangesAllowed, BATCH_FROZEN_FIELDS, BATCH_READ_ONLY_STATUSES, isLockChangeOnly); tests integration/services/persistence/batches.integration.spec.js,
  integration/services/close/system-batch-guard.integration.spec.js, e2e/batches.e2e.spec.js.'
- 'Pinned react-console (baf6dae3), examined sources: app/(console)/console/[tenantId]/accounting/batches/[batchId]/edit/page.tsx,
  components/accounting/batches/edit-batch-sheet.tsx; journeys ACT-ACC-0505, 0506, 0540.'
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-003, TC-PI-005]
exercised_by: [FAS-ACC-BAT-01-01, FAS-ACC-BAT-01-03, FAS-ACC-BAT-01-04, FAS-ACC-BAT-01-05]
suites: [TST-ACC-BAT-027, TST-ACC-BAT-055, TST-ACC-BAT-060, TST-ACC-BAT-074, TST-ACC-BAT-085]
---

# Correct batch details before posting

## Purpose

Staff correct a workable batch while preserving details already used by posted accounting.

## How It Works

Staff open Edit Details and correct the batch information relevant to their work. The service checks whether the batch can still accept the change. A changed date can also change the fiscal context. A supplied version lets the save detect intervening edits. Update locks require a separate release before an ordinary correction. Posted accounting prevents ordinary field edits, and a refusal leaves the saved batch intact.

## Relationships

- Prerequisite: Collect a business unit’s documents in a new batch, which addresses the connected batch work.
- Related outcome: Use the batch’s permitted lifecycle actions, which addresses the connected batch work.
- Related outcome: Arrange automatic close and posting, which addresses the connected batch work.
