MEGAINFRA-WEBAPP/src/lib
DEls e0417e4560 fix(po-schema): allow qty = 0 on line items
PO ingestion was rejecting valid line items with qty = 0 (base
corrections, pending test rows) because the schema strictly required
qty > 0. Loosen the guard to qty >= 0 while keeping rate, disc_percent
and vat_percent strict. Also tighten against non-finite numbers
(NaN, +/-Infinity) via Number.isFinite — the previous !(qty > 0) guard
let Infinity slip through.

- Schema: qty >= 0, finite; rate/disc/vat rules unchanged
- Tests: add positive case for qty = 0; add negative + NaN rejection
- 35/35 schema tests pass; tsc clean
2026-08-24 21:32:13 +02:00
..
batch-state.test.ts refactor(batch): drop unused status field, expand test edges 2026-08-19 19:29:35 +02:00
batch-state.ts refactor(batch): drop unused status field, expand test edges 2026-08-19 19:29:35 +02:00
pb-types.ts feat(fuel): add QR code and cost per hour to vehicle and plant summaries 2026-08-20 01:31:15 +02:00
pb.ts diag: include step + detail in process-batch lookup_failed 2026-08-24 18:39:15 +02:00
purchase-order-schema.test.ts fix(po-schema): allow qty = 0 on line items 2026-08-24 21:32:13 +02:00
purchase-order-schema.ts fix(po-schema): allow qty = 0 on line items 2026-08-24 21:32:13 +02:00
utils.ts Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00