Stock selection
Stock selection chooses the source stock for each order line. It is separate from the saved pick route, which orders work after reservation. Allocation and reservation owns the selection passes, eligibility, matching preference, complete handling and reservation bookkeeping.
Pick source order
An order strategy has a typed pickSourceOrder:
FIFOis the default for every existing and new strategy. Each pass keeps its exact order:strategyDate, amount, creation time, then stock id, all ascending.SAME_DAY_NEARESTuses proximity only while the Facility haskaryo.proximity.enabledon. The Facility setting remains off by default. With it off, selection is exactly FIFO.
Within each pass, earlier rotation days always precede later days. Within one day, the nearest
measurable source wins. A day is the Facility's local calendar day (karyo.facility.time-zone, UTC by default)
of strategyDate, Karyo's existing rotation date: receipt time without a best-before, or
best-before midnight when supplied. This keeps the existing best-before rotation fence. Unknown dates follow known dates in their original order;
they do not form an interchangeable day.
The distance is the shortest walk from any anchor: the first Area's entry (the depot), or a location already selected for an earlier line of the same delivery order. The first line uses the depot alone. Reservation retries also include the earlier lines already covered. Short-pick follow-ups pass the earlier lines' sources, never another order's sources. Candidates without a measurable walk follow measurable candidates within their day. Equal walks keep exact FIFO order.
The distance service computes the walk from the layout and applies administrator zone-distance corrections. Selection reads one immutable floor of only the candidate and earlier-source locations, never the whole Facility and never one floor per candidate pair.
This rule changes ordering only inside a pass. preferMatching still chooses an exact amount
before ordinary selection. completeHandling still requires strict complete loads and retains
its amount and combination rules. Lot preference, locked-stock eligibility, fixed-slot ceilings,
exclusions and extension filters keep their existing precedence. Extension filters can still
remove or reorder the candidates after the built-in ordering.
The console offers Pick source order under Reservation in the order strategy form. Choosing Same-day nearest does not enable the Facility setting or the separate pick-route option. Changes affect future selections only, not reservations already made.