Skip to content

ATS-ACC-TRX-004Abandon and restore uncollectable debt: Capability Test Specification

Markdown

ATS-ACC-TRX-004

Abandon and restore uncollectable debt: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-ACC-TRX-004

Design

Executed by
TST-ACC-TRX-020, TST-ACC-TRX-131

KindAcceptance test setProduct areaAccountingModuleTransactionsRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-ACC-TRX-069
  • Validation covered
  • Permission covered
  • Edge gap: FND-ACC-TRX-069
  • Failure gap: FND-ACC-TRX-069
  • Boundary gap: FND-ACC-TRX-069
  • Concurrency gap: FND-ACC-TRX-069
  • Invariant gap: FND-ACC-TRX-069
  • Interaction covered

Test Scenarios

7 scenarios proving CAP-ACC-TRX-004; 5 bound to an existing test.

01 Write-off cannot exceed eligible debtvalidationapinegativetest
Proves
BR-CAP-ACC-TRX-004-01
Preconditions
A draft exists and an issued line owes 40.00.
Steps
[ { "do": "Write off the draft and request 40.01 on the line.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it writes nothing: no write-off, no ledger line, no fact, no event" } ]
Expected
Neither attempt writes an adjustment or changes debt.
Data
Draft and issued invoice examples.
Bound to
Source
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it writes nothing: no write-off, no ledger line, no fact, no event
02 Partial abandonment retains remaining debttransitionapitest
Proves
BR-CAP-ACC-TRX-004-02
Preconditions
Two unpaid invoice lines exist.
Steps
[ { "do": "Abandon one line and part of the next, then its remaining amount.", "provenance": "test", "source": "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" } ]
Expected
Line standing changes first and invoice standing changes after all debt is abandoned.
Data
A two-line real invoice.
Bound to
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
Source
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
03 Write-off policy controls method and accountruleapitest
Proves
BR-CAP-ACC-TRX-004-03 BR-CAP-ACC-TRX-004-04
Preconditions
The unit defaults to direct treatment and another unit has an allowance account.
Steps
[ { "do": "Try default method, account-free allowance, foreign account and direct treatment with allowance account.", "provenance": "test", "source": "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" } ]
Expected
Default is direct, account-free allowance succeeds and incompatible accounts fail.
Data
Account choices from two units.
Bound to
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
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)
Source
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
04 An opposing write-off restores debt oncetransitionapitest
Proves
BR-CAP-ACC-TRX-004-05 INV-DOM-ACC-TRX-001-15
Preconditions
A numbered write-off has issued.
Steps
[ { "do": "Reverse it, repeat that reversal and attempt reversal of the opposing document.", "provenance": "test", "source": "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" } ]
Expected
The next numbered document restores balances; later reversals are denied.
Data
A previously abandoned balance.
Bound to
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
services-accounting:modules/transactions/tests/e2e/write-offs.e2e.spec.js#it reverses it through the reverse action, answering the reversal and restoring the invoice
Source
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
05 Independent approval protects abandonmentpermissionapiproposed
Proves
BR-CAP-ACC-TRX-004-07
Preconditions
The unit’s intended approval thresholds are zero.
Steps
[ { "do": "Create a write-off, attempt self-approval and approve as another person.", "provenance": "proposed", "source": "services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-5" } ]
Expected
The proposed flow waits, rejects self-approval and issues after independent approval.
Data
Requesting and approving identities.
Source
services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-5
06 Write-off inspection does not grant mutationpermissionapinegativetest
Proves
BR-CAP-ACC-TRX-004-08
Preconditions
The caller holds reader authority.
Steps
[ { "do": "Attempt creation and reversal and inspect available actions.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/e2e/write-offs.e2e.spec.js#it is refused the create and the reverse 403 permission_missing" } ]
Expected
Mutations are denied and actions empty while the record remains readable.
Data
A read-only staff identity.
Bound to
services-accounting:modules/transactions/tests/e2e/write-offs.e2e.spec.js#it is refused the create and the reverse 403 permission_missing
Source
services-accounting:modules/transactions/tests/e2e/write-offs.e2e.spec.js#it is refused the create and the reverse 403 permission_missing
07 Restored debt can receive money in a new batchinteractionapiproposed
Proves
BR-CAP-ACC-TRX-004-01 BR-CAP-ACC-TRX-004-05 BR-CAP-ACC-TRX-008-01 BR-CAP-ACC-TRX-008-04 BR-CAP-ACC-TRX-015-01 BR-CAP-ACC-TRX-015-03
Preconditions
An isolated workspace has eligible customers, products, matching accounts, an open period and two open batches. Each branch owns separate financial records.
Steps
[ { "do": "Write off an unpaid 80.00 bill, reverse the write-off, move the opposing record to another eligible batch and allocate an 80.00 receipt to the restored bill.", "provenance": "proposed", "source": "services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it writes nothing: no write-off, no ledger line, no fact, no event; 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; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-004-write-off-a-balance-and-restore-it.md#WF-ACC-TRX-004; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-004-write-off-an-uncollectable-balance-and-restore-it.md#BR-CAP-ACC-TRX-004-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-004-write-off-an-uncollectable-balance-and-restore-it.md#BR-CAP-ACC-TRX-004-05; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03" } ]
Expected
The restored 80.00 debt can be paid; retained abandonment and opposing records explain the change, while the batch move changes no debt.
Data
Separate command keys, two customers, invoice lines, receipts and credit; controlled processor outcomes and a fixed calendar where the branch requires them.
Source
services-accounting:modules/transactions/tests/integration/services/write-offs/write-offs.integration.spec.js#it writes nothing: no write-off, no ledger line, no fact, no event; 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; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-004-write-off-a-balance-and-restore-it.md#WF-ACC-TRX-004; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-004-write-off-an-uncollectable-balance-and-restore-it.md#BR-CAP-ACC-TRX-004-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-004-write-off-an-uncollectable-balance-and-restore-it.md#BR-CAP-ACC-TRX-004-05; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-015-move-a-transaction-to-another-batch-and-correct-its-details.md#BR-CAP-ACC-TRX-015-03

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.