Skip to content

v1.19.0: receiving and putaway

Choose a tag to compare

@mhightower932 mhightower932 released this 18 Jun 17:10
532db29

Receiving and putaway

Three threads. An admin can reverse a single PO receipt (the double-scan fix) with a warehouse-pool inventory walk and a receipt.cancelled event so downstream inbound counts stay in step. The Put-Away supervisor dashboard becomes a grid of bin tiles, red when a staging bin holds work and grey when empty, so the whole staging map reads at a glance. And preferred bins are constrained to a strict, Pickable-only priority hierarchy.

Mobile. PutAwayScreen surfaces the preferred-bin rejection reason instead of swallowing it. versionCode 8 -> 9, version 1.19.0; a new APK build is owed.

Added

  • Admin unreceive (#388): record_unreceive reverses one PO receipt in a single transaction -- decrements the PO line, recomputes PO status, hard-deletes the item_receipts row, writes an ACTION_RECEIVE_CANCEL audit row (details.source='admin_unreceive'), and emits receipt.cancelled/1. Inventory backs out of the warehouse pool (preferring the original bin, then any bin holding the item) so the reversal lands even after putaway has moved the goods; refuses with insufficient_available when the warehouse total is short. GET /admin/purchase-orders/<id>/receipts and POST /admin/receipts/<id>/unreceive (both gated by the existing receiving page key), plus receipt history + a per-row Unreceive control in the admin Receiving modal.
  • Put-Away supervisor dashboard (#389): an auto-fill grid of bin tiles, alphabetised, red-bordered when a staging bin has items awaiting putaway and grey when empty; clicking a populated tile opens the per-item breakdown with a per-bin CSV export. The /putaway/pending list now joins preferred_bins and surfaces the same priority-1 suggested bin as the single-item suggest endpoint.

Changed

  • Preferred bins: strict Pickable priority hierarchy (#390): both preferred-bin write paths (the admin POST and the putaway set-as-primary) reject any bin whose type is not Pickable. A deferrable UNIQUE(item_id, priority) constraint plus an admin auto-resequence keep each item's bins a contiguous 1..K hierarchy. The rejection is now surfaced on the admin Preferred Bins page (as an error) and on the handheld putaway prompt.

Migrations

  • 069 -- preferred_bins gains a deferrable UNIQUE(item_id, priority) constraint and drops the redundant non-unique (item_id, priority) index. Aborts if duplicate (item_id, priority) rows remain, so dedup before applying.

Upgrade notes

  • Apply migration 069. Dedup any existing duplicate (item_id, priority) preferred_bins rows first, or the ADD CONSTRAINT will abort.
  • Mobile: a new APK build (versionCode 9) is owed for the PutAwayScreen change; the API/admin work in this release does not require it.