Skip to content

CAP-ACC-TRX-003Adjust billed value with memos

Markdown

CAP-ACC-TRX-003

Adjust billed value with memos

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

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
Staff change an invoice’s debt without replacing its issued commercial record.Invalid or excessive adjustments leave the original position intact. Voiding retains the memo and adds opposing lines rather than erasing it.
Surfaces
consoleapi
Constraints
A memo contains no more than two hundred and fifty lines.
Intent sources
services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D5services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D7services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D8services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D12services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-5

Controls

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

Permissions

KeyChecked atScope
accounting.credit-memos.createapitenant
accounting.credit-memos.readapitenant
accounting.credit-memos.updateapitenant
accounting.debit-memos.createapitenant
accounting.debit-memos.readapitenant
accounting.debit-memos.updateapitenant

Business Rules

12 rules, 11 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
Memos target an issued real invoice and its own lines; drafts, void invoices and unconverted quotes are ineligible.
validationservice, databasetest
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)
02must prove
Proposed
Saving a memo issues it immediately using its kind’s numbering sequence beginning at one million; no draft stage is available.
lifecycleservicetest
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
03must prove
Proposed
Credit cannot exceed the line’s outstanding value plus releasable paid money, and an excessive credit rolls back every associated write.
validationservice, databasetest
04must prove
Proposed
Crediting paid value releases only the needed allocations, starting with the newest payment, and retains that value as unapplied money rather than paying a refund.
calculationservicetest
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
Proposed
The memo form always releases paid value under the freeing rule and offers no alternative treatment.
policyconsoleobserved
06must prove
Proposed
Fully credited lines become cancelled; the invoice becomes cancelled when memos eliminate its total, while a partial reduction remains open until settled.
calculationdatabasetest
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
07must prove
Proposed
A debit memo creates zero-priced invoice lines carrying the added charge, increasing the balance beyond the invoice’s original total.
calculationservice, databasetest
08must prove
Proposed
Credit tax is apportioned from the gross reduction using the original tax proportions, while debit tax is calculated anew and added to the requested charge.
calculationservicetest
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
09must prove
Proposed
Voiding requires a reason and adds dated negating lines restoring the invoice’s position; repeated voids and memo deletion are unavailable.
lifecycleservice, databasetest
10must prove
Proposed
A debit memo cannot be voided for more than its added line still owes after later credits.
validationservice, databasetest
11must prove
Proposed
A memo defaults to today, uses an open period no earlier than the invoice’s accounting date, and enters an explicitly selected or assigned batch.
validationservicetest
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
12must prove
Proposed
Creating and voiding use the memo kind’s create and update authorities respectively; read access grants inspection without actions.
permissionapitest
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

Scenarios

IdGivenWhenThenProvenance
01Older and newer checks contributed 35.00 and 25.00 to one line.Reduce the line by 10.00 with a credit memo.Only the newer receipt regains 10.00 of unapplied value.test
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
02Dues have been billed on a real invoice.Issue a debit memo for a late charge.A zero-priced late-charge line increases the invoice’s outstanding amount.test
03Two requests compete to credit the same remaining dollar.Submit the memo requests concurrently.One memo succeeds and the rejected request leaves no associated records.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.