Partial deliveries against a PO line are the reason qty_outstanding is dropped rather than wired: a stored counter must be decremented correctly on every receipt, OCR re-run and correction, and PocketBase has no real transactions to guarantee that. The sum over delivery_note_items cannot drift. Records the relation chain, the two invariants (unmatched lines count toward nothing; over-delivery is legal), and the fulfilment test cases. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| plans | ||
| specs | ||