Browse all articles

How the order quantity is calculated

Last updated

The advice answers one question: how much do you need to order now so you stay in stock until the next order arrives? Purchasing works it out per product in the same steps every time, and shows each step. Open a product’s Planning tab and click Show the calculation to follow along with your own numbers.

The Planning tab in the product window

Step 1: how long the order has to last

This period is the cycle: the lead time plus the time until the next order.

  • Lead time: taken from the supplier product, else from the supplier’s default Shipping option, else from the supplier. Days the supplier is closed are added. A product without any lead time gets no advice.
  • Until the next order: the supplier’s Order every (days). When you leave it empty, Purchasing advises a period per supplier. It weighs the supplier’s fixed order costs against the cost of holding stock (Holding cost per year, default 20 % of the value) and makes the period long enough to reach the supplier’s minimum order value. The advised period is 1 to 90 days. Without enough sales data it is 14 days.
  • For the sales during the lead time, at least 7 days count, so a very short lead time does not leave you without buffer.
  • The cycle is at most 365 days.

The calculation shows this as Expected sales over the cycle, for example “Lead time 10 + until next order 14 = 24 days”, with the forecast for those days.

Step 2: safety stock

The forecast is never exact and deliveries can be late. Safety stock covers that, so you reach the product’s service level. It depends on:

  • the service level of the product or its class (see Service levels and ABC/XYZ classes);
  • how far the forecast was off in the past (from the nightly accuracy test);
  • how much the supplier’s lead time varies. Until 5 orders of a supplier are measured, Purchasing assumes 10 % of the lead time (Lead time spread in the settings). After that it uses the measured spread.

Safety stock can be negative for a low service level. The sentence on the Planning tab then says how many fewer pieces are enough. The service level is shown with one decimal, for example 97.5 %.

Step 3: order up to

Order up to = expected sales over the cycle + safety stock. It is what you want to have over the cycle.

Step 4: what you already have

From the order-up-to level Purchasing subtracts:

  • Lost before the order arrives: sales in the lead time that your stock cannot cover any more. They are lost anyway, so they need no stock. Not for suppliers that work with backorders.
  • Free stock, Returns on the way back and In pre-built bundles.
  • Stock of the replaced product: the free stock of the product this one replaces, when Count its stock too is on. See New products and predecessors.
  • Already on the way: open deliveries, as far as they count before the next order.

The result is Needed: the quantity before the supplier’s rules. See What counts as stock.

Step 5: supplier and product rules

The rules are applied in this order. The calculation lists every rule that changed the quantity under Supplier rules.

  1. Phase out: only the shortage is ordered. Always keep in stock: the target is at least one box.
  2. Maximum stock and Maximum stock value: the order never takes the stock position above them.
  3. Minimum stock: the order brings the stock position up to at least the minimum.
  4. Minimum and box size: the quantity is rounded up to whole boxes of the lot size, and whole boxes are added until the minimum order quantity (MOQ) is reached. Lot rounding only applies while Order in lots is on for the supplier (on by default). When the supplier product has Pack sizes, only those packs are ordered and the lot size is not used (Packaging units in the calculation).
  5. Economic order quantity: when you set a Fixed order quantity on the supplier product, an order is raised to at least that quantity.
  6. Supplier stock: the order is lowered to the supplier’s stock, in whole boxes. This only applies when Use supplier stock as a cap is on for the supplier (in the supplier import: the stock_cap column). The supplier stock comes from the supplier stock upload or feed.
  7. Shelf life: never more than sells within the shelf life after arrival.

The final line, Advice, shows the quantity, the boxes and the cost.

Example

You need 18 pieces. The lot size is 12 and the MOQ is 30. Rounded to whole boxes, 18 becomes 24. That is below the MOQ, so another box is added: the advice is 36.

A minimum order quantity alone never triggers an order: if your stock covers the target, the advice is 0, whatever the MOQ.

Good to know

Related articles


Was this helpful?

Related articles