Manufacturing orders: plan and record

A manufacturing order (MO) holds two things: the plan (what the order is expected to use) and the record (what actually happened in stock). Read the plan to see what an order will need; read the record to see what it consumed, produced and picked.

The guides in this section follow one workshop: an e-bike workshop building 10 City e-bikes. Each bike takes 1 Aluminium frame M (batch-tracked), 1 Hub motor 250 W, 1 Battery 36 V 14 Ah, 8 M8 bolts and 0.02 kg of Chain grease (batch-tracked).

The plan

ResourceWhat it holds
manufacturing_ordersplanned_quantity of the product and the order's status.
manufacturing_order_recipe_rowsOne row per ingredient: planned_quantity_per_unit (the plan is this times the order's planned quantity) and total_actual_quantity (what the order is expected to use, replacing the plan when set).
manufacturing_order_operation_rowsOperations with planned and actual time.

Committed stock and availability count the greater of the plan and total_actual_quantity, less what the order has already picked or consumed; cost estimates use the same greater value. Changing a recipe row moves no stock.

For the e-bike order, the M8 bolt row has planned_quantity_per_unit: 8, so the plan is 80 bolts.

Set total_actual_quantity when the order goes off the plan, in either direction, whenever you learn it. Ahead of production: a supplier changed the bolt pack and each bike now takes 9, so set 90. Or after the fact: the floor reports 84 bolts used, so set 84 before completing. Rows that stayed on plan need no value.

The record

ResourceWhat it holds
manufacturing_order_productionsOne per completion: the quantity of products added to stock, with its batches or serial numbers.
manufacturing_order_production_ingredientsThe ingredient stock movements. With a production_id: material a completion consumed. Without one: a pick, material taken for the order that no completion has used yet. A negative quantity: material returned to stock at completion.
Production operationsTime recorded per completion (operations on the production).

Stock levels follow the record. A completion moves its products into stock and its ingredients out of stock; a pick moves ingredients out of stock as soon as they are taken for the order, before anything is produced.

How they relate

  • Without ingredient picking, completing the order writes the record from the plan: setting the order to DONE consumes each recipe row's total_actual_quantity (or its plan). For a plain order completed in one go, plan and record read the same.
  • With partial completions, each production records its own consumption, so the record grows step by step while the plan stays the whole order. See Completing manufacturing orders.
  • With ingredient picking, material leaves stock when it is picked, and completions consume only picked material. The last completion consumes the remaining picks; what you report as not used goes back to stock. See Picking ingredients.

Reading an order

QuestionRead
What will the order use?GET /manufacturing_order_recipe_rows?manufacturing_order_id=…
What did it consume, and when?GET /manufacturing_order_production_ingredients?manufacturing_order_ids=…, rows with a production_id
What is picked and waiting?The same list, rows without a production_id
How many products were made?GET /manufacturing_order_productions?manufacturing_order_ids=…

Did this page help you?