Skip to content

CAP-ACC-BAT-002Locate batches and inspect their current contents

Markdown

CAP-ACC-BAT-002

Locate batches and inspect their current contents

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Readers can inspect collections, their live totals and their downstream relationships.
Surfaces
consoleapi

Controls

17 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
accounting.batches.readapitenant
accounting.batches.readconsoletenant
accounting.batches.queryservicetenant

Business Rules

9 rules, 9 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Batch-read permission governs the API and console pages; without it, the console presents its access refusal rather than an empty batch list.
permissionapi, consoletest
services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses a caller without accounting.batches.read 403
02must prove
Proposed
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.
validationapi, servicetest
services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses a fiscal_period filter without its fiscal_year_id 400
03must prove
Proposed
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.
calculationservicetest
04must prove
Proposed
Live totals exclude drafts, pro forma and void invoices, void memos, voided payments, void credits and both sides of a reversed write-off.
calculationservicetest
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
05must prove
Proposed
Live monetary totals use the batch currency and are rounded to two decimal places.
calculationserviceobserved
06must prove
Proposed
A request from another workspace cannot distinguish the batch from a missing batch.
invariantdatabase, apitest
07must prove
Proposed
Dependent lookup follows downstream references through posted, downloaded and errored batches and rejects an empty starting list.
calculationapi, servicetest
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
08must prove
Proposed
The Batches reporting dataset uses code as the batch number, falling back to name, links transaction batches and declares a separate query permission.
policydatabasetest
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
09must prove
Proposed
Dependent lookup permits one to one hundred starting references and refuses a traversal containing more than one thousand references, including its starting set.
validationserviceobserved

Scenarios

IdGivenWhenThenProvenance
01An October batch contains live invoices and adjustments alongside a void invoice.Staff inspect the batch totals.The live document kinds contribute their counts and amounts, while the void invoice is excluded.documented
02The business unit has more batches than one maximum-size page.A reader follows the result cursor.The subsequent page continues the ordered results so all matching batches remain reachable.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.