diff --git a/docs/n8n/delivery-note-ocr.md b/docs/n8n/delivery-note-ocr.md index 489987f..0490dea 100644 --- a/docs/n8n/delivery-note-ocr.md +++ b/docs/n8n/delivery-note-ocr.md @@ -344,7 +344,7 @@ Watch the workflow's execution log in n8n and the DN's `processing_status` in Po ## Changelog -### 2026-09-17 — disconnected the split branch (workflow edit pending) +### 2026-09-17 — split branch pending disconnection (workflow edit pending) The branch `Is first delivery note?` (false) → `Create split DN record` in workflow `Delivery Note OCR` (`wVbLw4paISkbrIpE`) **needs to be diff --git a/scripts/migrate-dn-item-units.py b/scripts/migrate-dn-item-units.py index b3696b6..c8cecc2 100644 --- a/scripts/migrate-dn-item-units.py +++ b/scripts/migrate-dn-item-units.py @@ -173,4 +173,4 @@ def main(apply: bool) -> None: if __name__ == "__main__": main("--apply" in sys.argv) - print("\nDone.") \ No newline at end of file + print("\nDone.") diff --git a/src/lib/dn-item-row.test.ts b/src/lib/dn-item-row.test.ts index 3e7fbc9..97e949f 100644 --- a/src/lib/dn-item-row.test.ts +++ b/src/lib/dn-item-row.test.ts @@ -131,4 +131,4 @@ describe("buildDeliveryNoteItemRows", () => { "OCR 95% · desc: G6 Sub Base · unit: kg · rate: 168.50 · match: 100%", ); }); -}); \ No newline at end of file +}); diff --git a/src/lib/dn-item-row.ts b/src/lib/dn-item-row.ts index a285d17..3b06148 100644 --- a/src/lib/dn-item-row.ts +++ b/src/lib/dn-item-row.ts @@ -25,7 +25,8 @@ export interface PoItemLite { } export interface DeliveryNoteItemRow { - /** Null when unmatched or unconvertible. */ + /** Null when unmatched or unconvertible. Non-null with `qty_received = 0` + * when the id is unverifiable (PO items could not be fetched). */ purchase_order_item: string | null; /** In the PO line's unit. Zero whenever purchase_order_item is null. */ qty_received: number; @@ -156,4 +157,4 @@ function asNumber(v: unknown): number | null { return Number.isFinite(n) ? n : null; } return null; -} \ No newline at end of file +} diff --git a/src/lib/utils.test.ts b/src/lib/utils.test.ts index 321bd1b..0243ecf 100644 --- a/src/lib/utils.test.ts +++ b/src/lib/utils.test.ts @@ -23,4 +23,4 @@ describe("formatQtyDual", () => { it("falls back to the raw figure when nothing converted", () => { expect(formatQtyDual(0, "ton", 12, "m3")).toBe("0 ton · 12 m3"); }); -}); \ No newline at end of file +});