docs(delivery-notes): add the phase 1 unit correctness implementation plan
Eight TDD tasks covering the units module, the row builder that removes the matched-id off-by-one, the PocketBase schema additions, the route rewiring, dual-unit display, the backfill migration for the 57 existing rows, and the operational steps to stop n8n minting orphan records and recover the two lost notes from scan_20260915. Also corrects the spec to name the migration as Python, matching the existing scripts/ convention. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e7df31f7e1
commit
4fd50f79a2
2 changed files with 1590 additions and 1 deletions
1586
docs/superpowers/plans/2026-09-17-delivery-note-unit-correctness.md
Normal file
1586
docs/superpowers/plans/2026-09-17-delivery-note-unit-correctness.md
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -228,7 +228,10 @@ then derive `suppliedMatchedIds` from `usableItems` and index `validIds` by
|
|||
the loop's own position over `usableItems`. Add a regression test covering a
|
||||
three-item payload whose middle item has `qty: 0`.
|
||||
|
||||
### 3.5 Migration — `scripts/migrate-dn-item-units.ts`
|
||||
### 3.5 Migration — `scripts/migrate-dn-item-units.py`
|
||||
|
||||
Python, matching every other data migration in `scripts/` and reusing
|
||||
`scripts/pb_env.py` for credentials.
|
||||
|
||||
Backfills the 57 existing `delivery_note_items` rows.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue