Skip to content

CAP-ACC-TRX-004Abandon and restore uncollectable debt

Markdown

CAP-ACC-TRX-004

Abandon and restore uncollectable debt

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaAccountingModuleTransactionsRevision1

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
Finance records debt it no longer expects to collect and can restore it if circumstances change.The records retain both the abandonment and its reversal. The product should add the deferred independent approval step.
Surfaces
consoleapi
Intent sources
services-accounting:docs/architecture/accounting-2.0/02-decisions.md#M1-6services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-2services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-5services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-7services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D6

Controls

22 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-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-004 TC-PI-001 TC-PI-003 TC-PI-005 TC-AI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
accounting.write-offs.createapitenant
accounting.write-offs.readapitenant
accounting.write-offs.updateapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Proposed
Write-offs apply only to an issued real invoice’s own outstanding lines, and an excessive or ineligible write-off leaves every record unchanged.
validationservice, databasetest
02must prove
Proposed
Partial write-offs leave outstanding lines open, fully abandoned lines become written off, and an unpaid invoice with a write-off and no balance becomes written off.
calculationdatabasetest
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it makes the whole line written_off and keeps the partly written-off line and the invoice open
03must prove
Proposed
The requested direct or allowance method overrides the unit default; only allowance treatment can name an allowance account belonging to that unit.
policyapi, servicetest
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it takes the unit’s default_write_off_method (direct) when the request names none
04must prove
Proposed
Write-off creation does not require resolved ledger accounts because posting selects the applicable accounts.
policyservicetest
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it accepts an allowance write-off naming no account: the unit’s allowance default serves when it posts (gl-at-posting)
05must prove
Proposed
Reversal creates a new numbered write-off dated today with opposite lines, restores the invoice and marks the original reversed; neither document can be reversed again.
lifecycleservice, databasetest
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it answers the reversal: a second write-off, numbered next, its lines negating the first’s
06
Proposed
Payment arriving for abandoned debt requires reversal of the write-off before application to the restored invoice.
policyservicedocumented
07must prove
Proposed
The product should require another person’s approval above unit thresholds, initially zero; this recorded requirement remains deferred.
permissionserviceunknown
08must prove
Proposed
Creation requires write-off create authority and reversal requires update authority; readers receive no mutation actions.
permissionapitest
services-accounting:modules/transactions/tests/e2e/write-offs.e2e.spec.js#it is refused the create and the reverse 403 permission_missing

Scenarios

IdGivenWhenThenProvenance
01The unit uses allowance treatment and the invoice is uncollectable.Write off the outstanding invoice through its record page.Written-off standing is retained while the adjustment awaits allowance posting.test
02The customer can now pay debt previously written off.Reverse the original write-off.The new opposite document restores the debt and marks its predecessor reversed.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.