Skip to content

ATS-ACC-TRX-003Adjust billed value with memos: Capability Test Specification

Markdown

ATS-ACC-TRX-003

Adjust billed value with memos: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleTransactionsRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

12 scenarios proving CAP-ACC-TRX-003; 11 bound to an existing test.

01 Memo targets must belong to eligible invoicesvalidationapinegativetest
Proves
BR-CAP-ACC-TRX-003-01
Preconditions
Draft, quote and issued invoices span two units.
Steps
[ { "do": "Credit ineligible documents or unrelated invoice lines.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it is refused 400 business_unit_mismatch for a line of another invoice of the unit (the ledger trigger’s check)" } ]
Expected
All invalid targets fail and existing debt remains intact.
Data
Issued invoices in separate units.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it is refused 400 business_unit_mismatch for a line of another invoice of the unit (the ledger trigger’s check)
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it is refused 400 business_unit_mismatch for a line of another unit’s invoice (the composite key)
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it is refused 400 business_unit_mismatch for a line of another invoice of the unit (the ledger trigger’s check)
02 Saving memos issues them immediatelytransitionapitest
Proves
BR-CAP-ACC-TRX-003-02
Preconditions
A real issued invoice is available.
Steps
[ { "do": "Create one memo of each kind.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it answers the memo whole: issued, numbered from 1,000,000, its line and total, the invoice’s bill-to" } ]
Expected
Both issue using their own sequences beginning at one million.
Data
A workspace with unused memo sequences.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it answers the memo whole: issued, numbered from 1,000,000, its line and total, the invoice’s bill-to
services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it answers the memo whole: issued, numbered from 1,000,000, its line naming the line it added
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it answers the memo whole: issued, numbered from 1,000,000, its line and total, the invoice’s bill-to
03 Excessive credit leaves no financial footprintfailureapinegativetest
Proves
BR-CAP-ACC-TRX-003-03 INV-DOM-ACC-TRX-001-13
Preconditions
An unpaid line owes 80.00.
Steps
[ { "do": "Request an 80.01 credit.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it writes nothing: no memo, no ledger line, no fact, no event" } ]
Expected
Refusal leaves no memo, allocation, receivable fact or event.
Data
An outstanding line with no prior applications.
Bound to
services-accounting:modules/transactions/tests/integration/db/invoices.table.integration.spec.js#it refuses a credit memo line that credits more than the line owes, through the ledger trigger (invoice_lines_balance_due_check)
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it writes nothing: no memo, no ledger line, no fact, no event
04 Paid-value freeing follows receipt recencyinteractionapitest
Proves
BR-CAP-ACC-TRX-003-04
Preconditions
Two receipts contributed 35.00 and 25.00.
Steps
[ { "do": "Credit 10.00, replay it, credit 30.00 on another equivalent line and exceed total eligible value.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it frees the newest check’s remaining 15.00 first, then 15.00 of the older check, each holding what was freed from it" } ]
Expected
The newest receipt frees first, replay adds nothing, and excessive credit preserves allocations.
Data
Two chronologically ordered checks.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it frees 10.00 from the newest check alone, back on that check as unapplied cash, the older check untouched; the line credited 10.00 and owing nothing
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it answers the same memo to the same request again, freeing nothing twice (idempotent)
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it frees the newest check’s remaining 15.00 first, then 15.00 of the older check, each holding what was freed from it
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it frees the newest check’s remaining 15.00 first, then 15.00 of the older check, each holding what was freed from it
05 Memo-derived standing matches the treatmenttransitionapitest
Proves
BR-CAP-ACC-TRX-003-06
Preconditions
An unpaid bill has two lines and another bill permits a retroactive coupon.
Steps
[ { "do": "Fully credit each line in sequence and apply the coupon memo.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it makes the credited line cancelled and leaves the invoice open with the other line’s 80.00" } ]
Expected
One cancelled line leaves the bill open, both cancel it, and coupon treatment marks its lines paid.
Data
Ordinary and coupon adjustment fixtures.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it makes the credited line cancelled and leaves the invoice open with the other line’s 80.00
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it makes the credited line cancelled and leaves the invoice open with the other line’s 80.00
06 Added debit remains distinct from original totalsruleapitest
Proves
BR-CAP-ACC-TRX-003-07
Preconditions
Two invoice lines already exist.
Steps
[ { "do": "Add a late charge through a debit memo.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it raises the header’s balance by the memo, its totals its own" } ]
Expected
A third zero-priced line increases debt without replacing original invoice totals.
Data
A late-fee product choice.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it adds a third line of origin debit_memo, priced zero, its accounting frozen from the unit’s defaults
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it raises the header’s balance by the memo, its totals its own
07 Memo tax respects source and exemptionboundaryapitest
Proves
BR-CAP-ACC-TRX-003-08
Preconditions
Taxed dues, untaxed gala and exempt billing are available.
Steps
[ { "do": "Credit dues, debit a taxable charge and debit the exempt invoice.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it apportions the dues line’s credit between the net and each tax line as the line was taxed, each row naming the invoice tax line it reverses" } ]
Expected
Credit proportions retain the original tax split; debit adds tax except on exemption.
Data
Tax configuration and exempt party data.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it apportions the dues line’s credit between the net and each tax line as the line was taxed, each row naming the invoice tax line it reverses
services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it taxes the added line at the invoice’s address and adds the tax to the amount requested: the memo line is the gross
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/memo-tax.integration.spec.js#it apportions the dues line’s credit between the net and each tax line as the line was taxed, each row naming the invoice tax line it reverses
08 Memo void preserves opposing linestransitionapitest
Proves
BR-CAP-ACC-TRX-003-09 INV-DOM-ACC-TRX-001-14
Preconditions
A memo eliminated the invoice’s billed value.
Steps
[ { "do": "Void it and request a second void.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it returns the invoice’s balances to what they were before the memo" } ]
Expected
New negative lines restore debt and today’s facts; repeat void fails.
Data
A fully credited invoice.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it answers the memo void, its negating lines after the originals, each naming the line it reverses
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it writes a credit_memo_voided fact of plus each line’s amount, dated today
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it returns the invoice’s balances to what they were before the memo
09 Later credit blocks an excessive debit voidedgeapinegativetest
Proves
BR-CAP-ACC-TRX-003-10
Preconditions
Half of a 10.00 added debit has been credited.
Steps
[ { "do": "Void the entire debit memo.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it is refused 400 over_application" } ]
Expected
No change occurs and the remaining added debt stays 5.00.
Data
A debit line with a subsequent credit.
Bound to
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/debit-memos.integration.spec.js#it is refused 400 over_application
10 Memo batch selection stays within the unitboundaryapinegativetest
Proves
BR-CAP-ACC-TRX-003-11
Preconditions
A foreign-unit batch and a rule-less unit are available.
Steps
[ { "do": "Create with the foreign batch, then omit selection in the rule-less unit.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it refuses no batch in a unit without batch assignment settings 409 batch_required" } ]
Expected
Invalid batch and absent assignment are refused.
Data
Two units and their batch contexts.
Bound to
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it refuses no batch in a unit without batch assignment settings 409 batch_required
Source
services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it refuses no batch in a unit without batch assignment settings 409 batch_required
11 Memo write authority cannot be inferred from readpermissionapinegativetest
Proves
BR-CAP-ACC-TRX-003-12
Preconditions
The caller can inspect memos.
Steps
[ { "do": "Attempt create, void, detail and batch operations, then list actions.", "provenance": "test", "source": "services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it is refused the create, the void, the details and the batch routes 403 permission_missing" } ]
Expected
Writes are denied, actions are empty and inspection remains allowed.
Data
A memo reader identity.
Bound to
services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it is refused the create, the void, the details and the batch routes 403 permission_missing
services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it is refused every credit memo route 403 permission_missing
Source
services-accounting:modules/transactions/tests/e2e/change-memos.e2e.spec.js#it is refused the create, the void, the details and the batch routes 403 permission_missing
12 Reduction releases money before cancellation coordinates its returninteractionapiproposed
Proves
BR-CAP-ACC-TRX-003-04 BR-CAP-ACC-TRX-003-06 BR-CAP-ACC-TRX-008-04 BR-CAP-ACC-TRX-008-06 BR-CAP-ACC-TRX-014-02 BR-CAP-ACC-TRX-014-04 BR-CAP-ACC-TRX-015-01 BR-CAP-ACC-TRX-015-03 BR-CAP-ACC-TRX-011-02 BR-CAP-ACC-TRX-012-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": "Settle an 80.00 bill, credit 20.00, place the released money on another eligible bill, and run a separate cancellation with refund treatment. Move the unposted memo to another eligible batch. In another branch, convert released money into customer credit and request a source-specific refund.", "provenance": "proposed", "source": "services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memo-allocations.integration.spec.js#it frees the newest check’s remaining 15.00 first, then 15.00 of the older check, each holding what was freed from it; services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it makes the credited line cancelled and leaves the invoice open with the other line’s 80.00; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-010-reverse-billing-in-one-operation.md#WF-ACC-TRX-010; 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-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-06; 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-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-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; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03" } ]
Expected
The reduction frees exactly 20.00 for allocation; the coordinated cancellation retains separate adjustment and return records; moving the memo changes no customer value.
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/change-memos/credit-memo-allocations.integration.spec.js#it frees the newest check’s remaining 15.00 first, then 15.00 of the older check, each holding what was freed from it; services-accounting:modules/transactions/tests/integration/services/change-memos/credit-memos.integration.spec.js#it makes the credited line cancelled and leaves the invoice open with the other line’s 80.00; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-003-issue-or-void-a-credit-or-debit-memo.md#WF-ACC-TRX-003; rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-010-reverse-billing-in-one-operation.md#WF-ACC-TRX-010; 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-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-06; 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-008-put-a-payment-s-money-on-the-right-invoices.md#BR-CAP-ACC-TRX-008-06; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-014-reverse-billing-in-one-operation.md#BR-CAP-ACC-TRX-014-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; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02; rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-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.