---
id: CAP-ACC-BAT-002
title: Locate batches and inspect their current contents
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 (read and list half)
- inventory CAP-ACC-BAT-016
- inventory CAP-ACC-BAT-017
- inventory CAP-ACC-BAT-018 (the Batches dataset)
- inventory RUL-ACC-BAT-051
- inventory RUL-ACC-BAT-052
- journey ACT-ACC-0509
- journey ACT-ACC-0541
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources: []
purpose: Finance staff locate their batch and inspect its current document and cash figures.
outcomes:
- Readers can inspect collections, their live totals and their downstream relationships.
concepts:
- CON-ACC-BAT-001
actors:
- ACT-ACC-007
- ACT-ACC-012
- ACT-ACC-006
surfaces:
- console
- api
permissions:
- key: accounting.batches.read
  where_checked: api
  scope: tenant
- key: accounting.batches.read
  where_checked: console
  scope: tenant
- key: accounting.batches.query
  where_checked: service
  scope: tenant
rules:
- id: BR-CAP-ACC-BAT-002-01
  proved_by: [ATS-ACC-BAT-002-01, TST-ACC-BAT-027, TST-ACC-BAT-055, TST-ACC-BAT-060]
  statement: Batch-read permission governs the API and console pages; without it, the console presents its access
    refusal rather than an empty batch list.
  kind: permission
  enforced_at:
  - api
  - console
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses a caller without accounting.batches.read
    403
  origin: none
- id: BR-CAP-ACC-BAT-002-02
  proved_by: [ATS-ACC-BAT-002-02, TST-ACC-BAT-060, TST-ACC-BAT-086]
  statement: Lists sort by date and then reference, return no more than two hundred batches per page, and support
    unit, status, year and period filters, with a year required for a period filter.
  kind: validation
  enforced_at:
  - api
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses a fiscal_period filter without
    its fiscal_year_id 400
  origin: none
- id: BR-CAP-ACC-BAT-002-03
  proved_by: [ATS-ACC-BAT-002-03, ATS-ACC-BAT-002-08, ATS-ACC-BAT-013-14, TST-ACC-BAT-058, TST-ACC-BAT-084]
  statement: Reads and lists calculate current document counts and amounts for every batch status, including payment
    and refund totals and net cash as payments minus refunds.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts
    exactly the real transactions of every kind and sums their amounts
  origin: none
- id: BR-CAP-ACC-BAT-002-04
  proved_by: [ATS-ACC-BAT-002-04, TST-ACC-BAT-084]
  statement: Live totals exclude drafts, pro forma and void invoices, void memos, voided payments, void credits
    and both sides of a reversed write-off.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#leaves
    a reversal out of its own batch, and answers minor units as major units to two decimals
  origin: none
- id: BR-CAP-ACC-BAT-002-05
  proved_by: [ATS-ACC-BAT-002-03, TST-ACC-BAT-058, TST-ACC-BAT-084]
  statement: Live monetary totals use the batch currency and are rounded to two decimal places.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/persistence/batch-totals.ts:batchTotalsStatement
  origin: none
- id: BR-CAP-ACC-BAT-002-06
  proved_by: [ATS-ACC-BAT-002-05, TST-ACC-BAT-028, TST-ACC-BAT-055, TST-ACC-BAT-086]
  statement: A request from another workspace cannot distinguish the batch from a missing batch.
  kind: invariant
  enforced_at:
  - database
  - api
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#reads
    another tenant’s batch as absent
  origin: none
- id: BR-CAP-ACC-BAT-002-07
  proved_by: [ATS-ACC-BAT-002-06, ATS-ACC-BAT-002-09, ATS-ACC-BAT-016-08, TST-ACC-BAT-060, TST-ACC-BAT-086]
  statement: Dependent lookup follows downstream references through posted, downloaded and errored batches and rejects
    an empty starting list.
  kind: calculation
  enforced_at:
  - api
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
    the posted and downloaded batches depending on those named, through others, with their id, name, date and status
  origin: none
- id: BR-CAP-ACC-BAT-002-08
  proved_by: [ATS-ACC-BAT-002-10, ATS-ACC-BAT-002-11, TST-ACC-BAT-065]
  statement: The Batches reporting dataset uses code as the batch number, falling back to name, links transaction
    batches and declares a separate query permission.
  kind: policy
  enforced_at:
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/db/batches-view.integration.spec.js#answers the
    reader of tenant A its batches, with every column, the number the code else the name
  origin: none
- id: BR-CAP-ACC-BAT-002-09
  proved_by: [ATS-ACC-BAT-002-07]
  statement: Dependent lookup permits one to one hundred starting references and refuses a traversal containing
    more than one thousand references, including its starting set.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: observed
  source: services-accounting:modules/batches/services/persistence/batches.ts:dependentBatchesOf; services-accounting:modules/batches/services/rules/batch-rules.ts:dependentBatchesOf
  origin: none
scenarios:
- id: SC-CAP-ACC-BAT-002-01
  given: An October batch contains live invoices and adjustments alongside a void invoice.
  when: Staff inspect the batch totals.
  then: The live document kinds contribute their counts and amounts, while the void invoice is excluded.
  provenance: documented
  source: services-accounting:docs/milestones/walkthroughs/ACCT-M3-handoff.md#Start here (step 2)
- id: SC-CAP-ACC-BAT-002-02
  given: The business unit has more batches than one maximum-size page.
  when: A reader follows the result cursor.
  then: The subsequent page continues the ordered results so all matching batches remain reachable.
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
    a page with more to follow, then the page after it
edge_cases: []
constraints: []
depends_on: []
related:
- CAP-ACC-BAT-013
- CAP-ACC-BAT-016
journeys:
- JNY-ACC-BAT-001
open_questions:
- OQ-ACC-BAT-004
evidence:
- 'Pinned services-accounting (f47cb263), examined sources: aws/api/batch-records.routes.ts (listBatches, getBatch,
  getDependentBatches), batches-api-mapper.ts (mapListBatchesQuery, mapDependentBatchIds), services/persistence/batch-totals.ts,
  services/persistence/batches.ts (listBatches, dependentBatchesOf), services/rules/batch-rules.ts (dependentBatchesOf),
  db/batches.view.ts, metadata/batches.object.ts, queries/batches.query.ts; tests e2e/batches.e2e.spec.js, e2e/batch-totals.e2e.spec.js,
  integration/services/persistence/batches.queries.integration.spec.js, batch-totals.queries.integration.spec.js,
  integration/db/batches-view.integration.spec.js.'
- 'Pinned react-console (baf6dae3), examined sources: app/(console)/console/[tenantId]/accounting/batches/layout.tsx,
  page.tsx, components/accounting/batches/batch-list-screen.tsx, lib/accounting/transactions/http/batches.ts, lib/authz/backend-aliases.ts;
  journeys ACT-ACC-0500, 0509, 0545.'
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, 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-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-005]
exercised_by: [FAS-ACC-BAT-01-01, FAS-ACC-BAT-01-04]
suites: [TST-ACC-BAT-027, TST-ACC-BAT-028, TST-ACC-BAT-055, TST-ACC-BAT-058, TST-ACC-BAT-060, TST-ACC-BAT-065, TST-ACC-BAT-084, TST-ACC-BAT-086]
---

# Locate batches and inspect their current contents

## Purpose

Finance staff locate their batch and inspect its current document and cash figures.

## How It Works

Staff start with the Batches list and narrow their search to the work they need. Paging lets them continue through the matching results. Opening a batch supplies the current document and cash figures. Those figures describe the present documents rather than replaying the posting snapshot. Dependent lookup follows downstream batches when staff need to understand an unposting restriction. Readers without the required access receive the access refusal.

## Relationships

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