Fase 5-full COMPLETE (BACKLOG #8)
Three pooled slices merged on this branch since v0.1.22:
- PO receipt + WAC (PR #38, slice 2) —
POST /api/v1/purchase-orders/{id}/receiveatomically incrementsproduct.stock, recomputesproduct.cost_pricevia weighted-average cost, emitsstock_movement(reason='purchase_receipt', ref=<po_id>), flips POdraft → received. Mirrorssales::apply_sale'sBEGIN/COMMITatomicity. - Accounts payable (PR #40, slice 3) —
purchase_paymentledger (migration 0016). Closes Fase 5-full. - Latent bug fix in
sales::post_sale(PR #43) — stock pre-check now indexes loaded products by id instead of zipping positionally againstIN $idsresults. Caused spuriousInsufficientStockunder load when stocks differed across the cart; no production data was at risk (the atomic tx'sproduct_batch.stock ASSERT >= 0would have aborted any oversell). Surfaced by the v0.1.22 stock-rotation test on serialized runs.
Additive. No schema breaking changes.
MSI
pharma-server-0.1.23-x86_64.msi — 12,304,384 bytes
sha256: 4a2c61c395d8f848bf3d5e6bda8f12cf2ea0f59f47c9bdf06233c567cc4d4a24
Smoke-verified: MajorUpgrade over v0.1.22, service Running, / {"version":"0.1.23"}, /health/ready 200 db:ok.
🤖 Generated with Claude Code