Prepare a shipment
The “Prepare a shipment” workbench brings together, in one place, two gestures that used to run side by side without talking to each other: picking the items to ship and finding the case that packs them. On the left you search for and add items; on the right the container proposal recomputes live as you add, with an indicative 3D view and a “Build the packing” button that actually puts the parts into the case (an audited action).
The screen lives at /stocks/preparer-envoi (“Prepare a shipment” link from the inventory). The selection is shared — it replaces the old checkboxes in the stock list.
The two-column workbench
Prepare a shipment end to end
- Left column — search and add
Filter stock by location, then search by reference, serial number or designation. Each result carries an “Add” button; an already-filled container shows a badge with the number of items it holds. Items already added drop out of the list to avoid duplicates.
- Cascading, multi-select location filters
Four cascading filters narrow the search: site → storage → zone → location. Each one is multi-select (you can tick several sites, several zones…). Within a filter, values combine with OR (“this site or that one”); across filters they combine with AND (“this site and that zone”). The offered options derive from the stock actually present: picking an upstream site shrinks the downstream list of storages, zones and locations. The “Reset locations” link clears every location filter at once.
- Right column — the « To ship » list
Added items show as chips, with the “To ship (n)” counter. For a batch item, a small × quantity field lets you pack less than what is available (capped at the stock on hand). “Remove all” clears the selection; the cross removes a single chip.
- Right column — the packing proposal
Below the list, the “Proposal” panel shows live the proposed container(s), any segregation, the 3D view and the action button. While no item is added, it simply invites you to add some.
The container proposal
The engine looks for empty containers available on the same site as the items to ship (the site is recalled at the top of the panel). Two outcomes:
- A single container is enough → it proposes the smallest single container able to absorb the whole batch (✓ “A single container is enough”). The smallest is preferred so as not to tie up a large case for nothing.
- Multi-case split → if no single container fits, the batch is spread across several containers, each shown with its own 3D view and its own button.
If one or more items fit no available container (too bulky, too heavy, or no compatible case), they are flagged in plain text under the proposal. Likewise, if the site has no dimensioned empty container, the panel says so rather than proposing nothing.
An item may restrict the container types that accept it (compatibility). The engine honours this: an incompatible container is discarded even if it is large enough.
Storage-condition segregation
Some items require a specific storage condition (flammable solvents, elastomers, refrigerated…). Two items with incompatible conditions cannot travel in the same case. When the selection mixes several conditions, the panel shows a warning “Different storage conditions — items are split into separate cases (segregation)” and groups the proposals by condition, each group carrying its own header (e.g. “Flammable”, “No condition requirement”).
The margin slider
A “Margin” slider (0 to 30 %) adds clearance around item dimensions before computing whether the batch fits. A larger margin leaves room for dunnage, protective wrapping or measurement uncertainty — at the cost of a potentially larger container. The proposal recomputes instantly as you move the slider (5 % by default).
The 3D view and full screen
Each proposed container comes with a 3D view showing how the parts are arranged inside, with an indicative fill ratio. This arrangement is produced by a deterministic heuristic: it is an indicative layout to picture the result and prepare the packing, not a normative stowage plan — the same selection always yields the same image, but it is not a certified dunnage computation.
The “Full screen” button (top-right corner of the view) opens the proposal large across the whole screen, which helps reading while physically filling the case. Exit with the “Close” button or the Esc key.
“Build the packing” — the real action
The “Build the packing” button (one per proposed container) actually puts the items into the container: it is not a simulation. On confirmation, each part is cased at the chosen quantities (including partial batch quantities), the operation is audited, a message confirms how many items were packed, and the “To ship” selection clears. The parts are now inside the container — ready to leave as a single parcel.
See also
- Technical reception — item intake into stock, where containers are also created and filled.
- Zones & quarantine — the stock conditions and climatic classes allowed per location, the source of the segregation rules.