Check lot quantities
This commit is contained in:
@@ -227,6 +227,10 @@ Invariants to preserve after every update:
|
||||
where `lot_p = virtual lot`, whether they are matched to a `lot_s` or not.
|
||||
- For a sale virtual lot, the second invariant sums all `lot.qt` lines where
|
||||
`lot_s = virtual lot`, whether they are linked to a `lot_p` or not.
|
||||
- A zero `lot.qt` row is accepted if it still keeps at least one `lot_p` or
|
||||
`lot_s` link: it is then the memory of a consumed forecast.
|
||||
- A `lot.qt` row without both `lot_p` and `lot_s` is blocked by
|
||||
`lot.qt.validate`.
|
||||
- The technical guard is centralized in
|
||||
`lot.lot.assert_lines_quantity_consistency()` and must be called at the end
|
||||
of flows that modify lots, matching, transport, weighing, or the contractual
|
||||
|
||||
Reference in New Issue
Block a user