01must proveProposed | A draft replacement requires the version last read and replaces the document as a whole; a stale version leaves it unchanged. | validation | api, service | test |
02must proveProposed | Changing a draft’s business unit or currency requires creating another draft. | invariant | service | test |
03must proveProposed | Invoice lines require active sellable products from the invoice’s unit, prices in its currency, and a currency supported by that unit; invalid input creates no draft. ✓ USD dues using the unit’s active product can be billed in USD.✗ A product belonging to a different unit fails the unit check. | validation | service, database | test |
04must proveConfirmed | Amounts use whole currency minor units, line extensions round once half away from zero, totals sum those rounded lines, and discounts cannot exceed extensions. ✓ An extension of 832.5 yen becomes 833 yen.✗ Discounting beyond the extended charge rejects the draft. | calculation | api, service, database | test |
05must proveProposed | An explicit due date takes precedence over requested or customer-default terms, otherwise the invoice date applies; the due date cannot precede the invoice date. | calculation | api, service, database | test |
06must proveProposed | A supplied service period includes both dates, with its end on or after its start. | validation | service | test |
07must proveProposed | Issue requires at least one line, an open fiscal period and an eligible batch selected explicitly or by assignment rules; refusal leaves the draft unnumbered. | validation | service, database | test |
08must proveProposed | Invoice numbering begins at one million within the workspace and permits gaps while preventing duplicates. | policy | service, database | test |
09must proveProposed | General ledger accounts are selected and frozen at posting, so missing account setup does not prevent issue. | policy | service | test |
10must proveConfirmed | Ordinary writes cannot change issued commercial content or delete an issued real invoice; the supported amendment path remains available for eligible unposted lines. | invariant | database | test |
11must proveProposed | Invoice status follows its monetary position, with an outstanding amount keeping it open and a zero-total invoice becoming paid immediately. | calculation | database | test |
12must proveConfirmed | A pro forma receives an invoice number without a batch or receivable, converts once while retaining that number, and can be deleted only before conversion; drafts can also be deleted. | lifecycle | service, database | test |
13must proveProposed | Issue freezes tax calculated from the line’s class and applicable billing or shipping address, exempts eligible organizations, and refuses taxable staff invoices lacking an address. | calculation | service, database | test |
14must proveProposed | Creation selects the requested card-fee policy or the unit default, and issue freezes the choice of none, required or optional. | policy | api, service, database | test |
15must proveProposed | With mandatory service periods enabled, an automatically deferred line lacking its period prevents issue before a number is allocated. | validation | service | observed |
16must proveProposed | Issue preserves a stored exchange rate, otherwise selects the inverse dated unit rate, and keeps no rate when neither is available. | calculation | service | observed |