Skip to content

ATS-ACC-TRX-002Correct issued bills before posting: Capability Test Specification

Markdown

ATS-ACC-TRX-002

Correct issued bills before posting: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleTransactionsRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-ACC-TRX-002; 9 bound to an existing test.

01 Amendment retains a revised bill and its deltatransitionapitest
Proves
BR-CAP-ACC-TRX-002-01 BR-CAP-ACC-TRX-002-03
Preconditions
An unposted invoice contains paid and unpaid lines.
Steps
[ { "do": "Add a charge, reprice the unpaid line and inspect history.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it answers the invoice at revision 2 with the line added after the last, the line repriced and the totals re-derived" } ]
Expected
Revision two retains the new ordering, recomputed totals, delta entries and amendment event.
Data
An open batch and partial check payment.
Bound to
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it answers the invoice at revision 2 with the line added after the last, the line repriced and the totals re-derived
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it writes the amended facts for the delta, the originals untouched, and the amend event with the delta
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it taxes the added line at the invoice’s address and re-makes the repriced line’s tax lines from its new net amount
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it amends an issued, unposted invoice (POST .../amend): a line added, the revision 2, the e-mail subject saying so
Source
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it answers the invoice at revision 2 with the line added after the last, the line repriced and the totals re-derived
02 Applied lines resist replacementinvariantapinegativetest
Proves
BR-CAP-ACC-TRX-002-02 INV-DOM-ACC-TRX-001-10
Preconditions
A line on an unposted bill has received money.
Steps
[ { "do": "Request removal and repricing of that line.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it removes a line with nothing applied at the next revision, and refuses removing or repricing the paid line" } ]
Expected
Both attempts identify the protected line and preserve the invoice.
Data
One retained allocation.
Bound to
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it removes a line with nothing applied at the next revision, and refuses removing or repricing the paid line
Source
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it removes a line with nothing applied at the next revision, and refuses removing or repricing the paid line
03 Posting prevents commercial correctionboundaryapinegativetest
Proves
BR-CAP-ACC-TRX-002-04
Preconditions
The invoice’s batch has posted.
Steps
[ { "do": "Attempt an amendment and date change, then edit descriptive text.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it is refused batch_not_open once the batch is posted" } ]
Expected
Financial changes fail while allowed text editing succeeds.
Data
A posted transaction batch.
Bound to
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it is refused batch_not_open on a change of its dates, while its text still changes
Source
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it is refused batch_not_open once the batch is posted
04 Posted debt cannot be voidedfailureapinegativeproposed
Proves
BR-CAP-ACC-TRX-002-04
Preconditions
The posted invoice has no applications.
Steps
[ { "do": "Attempt a reasoned void.", "provenance": "proposed", "source": "services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4" } ]
Expected
The batch refusal leaves the invoice open and its debt unchanged.
Data
Posted invoice context.
Source
services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4
05 Terms and explicit dates use the right precedenceruleapitest
Proves
BR-CAP-ACC-TRX-002-05
Preconditions
The invoice starts with thirty-day terms.
Steps
[ { "do": "Select ten-day terms, combine terms with a date, then request a date before billing.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it answers the memo, the terms and the explicit due date, which wins over the terms’ own" } ]
Expected
The derived and explicit dates apply; the invalid request changes nothing.
Data
Ten-day and thirty-day definitions.
Bound to
services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it answers the memo, the terms and the explicit due date, which wins over the terms’ own
Source
services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it answers the memo, the terms and the explicit due date, which wins over the terms’ own
06 Details update atomicallyfailureapitest
Proves
BR-CAP-ACC-TRX-002-06
Preconditions
An issued bill can reference a document template.
Steps
[ { "do": "Submit memo and terms with an invalid date, then correct the descriptive fields.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it leaves the memo, the terms, the due date and the version as they were" } ]
Expected
Invalid input preserves fields and version; valid input records only requested changes and its event.
Data
An invoice template.
Bound to
services-accounting:modules/transactions/tests/integration/services/invoices/details.integration.spec.js#it changes the memo, the notes, the purchase order number and the template
Source
services-accounting:modules/transactions/tests/integration/services/invoices/details-terms-due-date.integration.spec.js#it leaves the memo, the terms, the due date and the version as they were
07 Date correction retains opposing historytransitionapitest
Proves
BR-CAP-ACC-TRX-002-07
Preconditions
An issued invoice remains unposted.
Steps
[ { "do": "Move its date into another open period, then beyond its due date.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it moves the invoice date of an issued, unposted invoice, re-dating its facts; refuses a date after its due date" } ]
Expected
Correcting entries relocate the receivable; the later invalid date fails.
Data
Open periods covering the intended dates.
Bound to
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it moves the invoice date of an issued, unposted invoice, re-dating its facts; refuses a date after its due date
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it moves the invoice date of an issued, unposted invoice (PUT .../details), the due date staying after it
Source
services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it moves the invoice date of an issued, unposted invoice, re-dating its facts; refuses a date after its due date
08 Void requires an untouched financial positiontransitionapitest
Proves
BR-CAP-ACC-TRX-002-08 BR-CAP-ACC-TRX-002-09 INV-DOM-ACC-TRX-001-12
Preconditions
Draft, untouched issued, memo-adjusted and written-off invoices exist.
Steps
[ { "do": "Void each with an explanation, then repeat a completed void.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it is refused invoice_has_money_applied, the invoice unchanged" } ]
Expected
Eligible documents void with today’s offsets; adjusted and repeated attempts fail.
Data
Credit-memo and write-off examples.
Bound to
services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it appends an invoice_voided fact per line for minus the line’s balance, dated today
Source
services-accounting:modules/transactions/tests/integration/services/invoices/void.integration.spec.js#it is refused invoice_has_money_applied, the invoice unchanged
09 Protection controls allowed invoice changesinvariantapinegativetest
Proves
BR-CAP-ACC-TRX-002-10
Preconditions
Examples have full protection and deletion-only protection.
Steps
[ { "do": "Attempt issue, details, removal and void operations.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it refuses the void of the issued invoice, which stays open" } ]
Expected
Full protection blocks mutations; deletion-only protection blocks removal.
Data
Owner-selected record locks.
Bound to
services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it refuses the issue, the details change and the delete of the draft, each in the configuration module’s words
Source
services-accounting:modules/transactions/tests/integration/services/invoices/locked-invoice.integration.spec.js#it refuses the void of the issued invoice, which stays open
10 Correction authority is distinct from readingpermissionapinegativetest
Proves
BR-CAP-ACC-TRX-002-11
Preconditions
The caller has invoice read authority alone.
Steps
[ { "do": "Attempt amendment, terms, due date, details and void commands.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused POST /invoices/{tenantId}/{id}/void without accounting.invoices.void (403)" } ]
Expected
Every mutation is denied without changing the document.
Data
A reader identity.
Bound to
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused POST /invoices/{tenantId}/{id}/amend without accounting.invoices.adjust (403)
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused PUT /invoices/{tenantId}/{id}/terms without accounting.invoices.update (403)
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused PUT /invoices/{tenantId}/{id}/details without accounting.invoices.update (403)
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused POST /invoices/{tenantId}/{id}/void without accounting.invoices.void (403)
Source
services-accounting:modules/transactions/tests/e2e/invoices.e2e.spec.js#it is refused POST /invoices/{tenantId}/{id}/void without accounting.invoices.void (403)
11 Posting changes the available correctioninteractionapiproposed
Proves
BR-CAP-ACC-TRX-002-01 BR-CAP-ACC-TRX-002-04 BR-CAP-ACC-TRX-003-02 BR-CAP-ACC-TRX-003-03 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": "Amend a live 80.00 bill in an open batch, move it to another eligible batch, then attempt amendment after that batch posts and record a credit memo instead.", "provenance": "proposed", "source": "services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it answers the invoice at revision 2 with the line added after the last, the line repriced and the totals re-derived; services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it is refused batch_not_open once the batch is posted; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-03; 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 unposted revision and move retain one bill; the later amendment fails and the separate memo supplies the reduction.
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/document-edits/reassign-and-edit.integration.spec.js#it answers the invoice at revision 2 with the line added after the last, the line repriced and the totals re-derived; services-accounting:modules/transactions/tests/integration/services/document-edits/reassign-and-edit.integration.spec.js#it is refused batch_not_open once the batch is posted; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-002-amend-re-date-or-void-an-issued-invoice.md#WF-ACC-TRX-002; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-01; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-002-correct-or-cancel-an-issued-invoice-before-its-batch-posts.md#BR-CAP-ACC-TRX-002-04; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-003-reduce-or-add-to-an-issued-invoice-with-credit-and-debit.md#BR-CAP-ACC-TRX-003-03; 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.