manufacturingOrdersEditProduction
Changes what completed lines recorded: processed and completed quantities, consumption, completion date, finished goods location, and time spent.
Business Rules
outputslists only completed lines, in the same shape as Complete.inputslists every component of those lines exactly once, and nothing else.- Each line’s recorded completion is reversed and recorded again with the new values in one step: its consumption returns and is consumed again, and its finished goods move from the old location and quantity to the new ones. Stock moves by the difference.
- A field left out keeps the line’s current value: completion date, location, labor hours, and processed quantity.
- The same rules as Complete apply, including processed quantity, the completed quantity limit, and taking extra consumption from available stock.
- Lowering a completed quantity needs only the difference to be unallocated at the line’s location. Moving finished goods to another location needs all of them unallocated at the old one.
- A refusal leaves every line as it was.
- Allowed while the order is In Production or Completed. A Completed order stays Completed.
- The order’s history records the edit as the line’s completion undone and recorded again.
- Both manufacturing and supply chain entitlements are required.
Error Scenarios
- “Manufacturing orders are not enabled for this company”
- “Complete SKU before editing its production.”
- “Production can be edited only while the order is In Production or Completed.”
- “Can’t edit: at least one product has insufficient quantity remaining in stock to reduce the completed quantity.” The order’s activity log gets a warning listing each product, its location, how many must be removed, how many are free, allocated, or missing there, and what to do.
- “Can’t undo: the unit of SKU changed after completion.”
- “Completed Qty can’t be more than Processed Qty.”
- “Completion date can’t be before Actual Start.”
- A message names components with insufficient stock.
- “This manufacturing order is now Closed. Reload it and try again.”
- “parsec” isn’t a unit we recognize. (Units are matched by name, label, or symbol, ignoring case.)
Permissions Required
manufacturing:complete_order
manufacturingOrdersEditProduction(
input: ManufacturingOrdersEditProductionInput!
): ManufacturingOrder!
Arguments
manufacturingOrdersEditProduction.input ● ManufacturingOrdersEditProductionInput! non-null input common
Parameters for ManufacturingOrdersEditProduction
Type
ManufacturingOrder object manufacturing
An order to make finished products at a building.