commit SGF2311
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# Receipt movement writer
|
||||
|
||||
## Development extension authorised on 21 November 2026
|
||||
|
||||
The owner authorised preparing unit conversion in development/QA only. The working source now recognises an optional `quantity_conversion` receipt-line snapshot (`inventory.quantity.v1`): documentary/base units, explicit positive rational factor, source/version, original article and both accepted quantities in integer millesimals. The same writer validates the exact conversion and writes/replays one physical movement. Without that snapshot, the facts, source hash and receipt quantity are unchanged. Published `releases/0.1.0` is untouched.
|
||||
|
||||
`QuantityConversion` is the sole exact arithmetic implementation; it rejects nonrepresentable quantities and integer overflow. It never converts prices. The host still validates/freezes the basis, unit mapping and actor under its company lock, and retains original order/receipt/invoice quantities and prices. The prepared Compras adaptation freezes the basis on the first accepted receipt for an order line/article, then requires it on subsequent portions; lots/issues use base units and supplier returns preserve the exact documentary equivalent.
|
||||
|
||||
Compras holds a hash-pinned **development artifact**, not a published release. Its loader refuses this artifact outside `testing` and a guarded disposable database; default configuration remains off. No installation, activation or operational change in SGF or the pilot is authorised or performed. Different writer versions require separate kernels. Test results and remaining criteria are recorded in the existing Compras delivery trackers.
|
||||
|
||||
`ReceiptMovementWriter` is the single extracted writer for a new accepted physical receipt line. Source code comes from the former insert in Purchasing `ReceiptWorkflow`; versioned artifacts are distributed locally, verified by manifest and never replaced with different contents.
|
||||
|
||||
The host owns the company lock, current actor/policy/conflict checks, order eligibility, quantities/units/quality, explicit warehouse/item mapping, lots, downstream signals and audit. It must call the writer within that same transaction, with an authorisation callback. The writer is not a public receipt intake API and must not be used to reconstruct/backfill historical effects or bypass `ReceiptWorkflow`.
|
||||
|
||||
Reference in New Issue
Block a user