CAP-ACC-BAT-006 Remove an unused batch safely
Markdown Planning / Accounting / Batch Management / Batch collection and control / Capability Remove an unused batch safely Purpose Staff discard an unused batch without removing the records that accounting still relies on.
How It Works Staff use deletion to clear a batch opened in error. The service first checks record protection and lifecycle restrictions. Dependencies then determine whether removal is safe. A successful deletion also clears its associated scheduled and attention work. Deleting the active batch can leave a recurring stream without a current batch. An in-use refusal preserves the batch and identifies the record that prevents removal.
Relationships Related outcome: Configure recurring batch streams, which addresses the connected batch work. Related outcome: Run and monitor a batch posting job, which addresses the connected batch work. Show evidence (sources, provenance, origins, pinned commits)Permissions Key Checked at Scope accounting.batches.deleteapi tenant
Business Rules 7 rules, 7 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.
Id Rule Kind Enforced at Provenance 01must prove Proposed
Deletion requires the batch-delete permission.
permission api observed 02must prove Proposed
Posted and Downloaded batches reject deletion.
lifecycle service test 03must prove Proposed
A remaining document, posting or ledger entry prevents deletion, with an in-use refusal identifying the dependency.
invariant database, service test 04must prove Proposed
Either kind of record lock prevents batch deletion.
policy service observed 05must prove Proposed
Period-close system batches cannot be removed through ordinary deletion.
policy service test 06must prove Proposed
An unused active batch can be deleted, clearing its recurring configuration’s active reference until a later roll supplies another.
policy database, service test 07must prove Proposed
Deletion also removes the automatic-close schedule and resolves the batch’s outstanding posting attention item.
lifecycle service test
Scenarios Id Given When Then Provenance 01An accidental Open batch has no references preventing removal. An authorized caller deletes it. A subsequent read reports that the batch does not exist. test 02Payments and credits still reference an Open batch. Staff request its deletion. An in-use refusal identifies those dependencies and preserves the batch. documented
← Previous Capability CAP-ACC-BAT-005 · Arrange automatic close and posting Next Capability → CAP-ACC-BAT-007 · Place documents in eligible batches and protect posted work