Box damaged: replace the box on a cart position
What this shows. What pick_assignment_position_replace_container does when the box at a position is damaged and the operator scans a new box.
Reading the diagram
- The new box must pass the same checks as a box bound at the start: empty, registered, not on hold, type and size as planned, not on another cart, usage allowed for the owner. Or it is the planned carton's own label. See How a cart is built.
- The call is refused when the scanned box is already the position's box (
SameBox), when it was written off, or when the damaged box carries a hold of its own. A hold that lands on the new or old box after the first check is found again under the container lock, and the whole replacement rolls back. - The picks keep their
carton_id. Only the physical box of the position changes. The swap is written inpick_position_container_replacement. - A repeat with a new key on a position that already holds the scanned box after a replacement answers
already_replacedand writes nothing. - The route status does not change. A replacement is not a route command.
Where it comes from
| What | Source |
|---|---|
| Steps and lock order | crates/libs/wms-outbound/src/picking/target/replace.rs:1-60 |
| Replace rules | crates/libs/wms-outbound/src/domain/pick_assignment/tare.rs:321-341 |
| New box checks | crates/libs/wms-outbound/src/picking/target/bind.rs:111-196 |
| Command and result | crates/libs/wms-outbound/src/picking/commands/replace_container.rs:1-79 |
RF screen PKA51 | crates/libs/wms-lib-sql/sql/rf-screens/098_uc_pick_carton_exceptions.sql |