The order of consideration of stock is always: date then state then size.
The date order is:-
- For reserved or committed batches that are not late it’s the expected arrival date.
- For reserved or committed batches that are late it’s ‘now’.
- For done batches with a length or width when the MS default Size Before Date is asserted its yesterday (i.e. all considered to be the same age).
- For done batches with an expiry date it’s set such that soonest to expire is considered first (Size Before Date not asserted).
- For other done batches it’s set such that oldest is considered first (Size Before Date not asserted).
The state order is: reserved then committed then done.
The size order is either smallest area, shortest length or shortest width first as dictated by the dimensions available.
Note that the state order is effectively reversed if the legacy batch scan order option is active (not recommended). See How do I choose between Legacy and Contemporary batch scan order? for a discussion on the use of the legacy batch scan order.