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 |
||
|---|---|---|
| .. | ||
| batch-state.test.ts | ||
| batch-state.ts | ||
| pb-types.ts | ||
| pb.ts | ||
| purchase-order-schema.test.ts | ||
| purchase-order-schema.ts | ||
| utils.ts | ||