entity

Product Order Item

One selected BOM line on a Product Order, with the product facts copied for the invoice and the line's drift tracked as a source status.

EntityStatus: Implemented in api-v1Entity

Purpose

An entity inside the Product Order aggregate. It is reachable only through the root, and the root replaces it rather than editing it. It is not a BOM line: the item copies the line and never changes it. It is also not an invoice-document line, which is the printed row.

Source status

  • current: the item’s quantity matches the BOM line’s adjusted quantity, compared at 4 decimals.
  • outdated: the counts differ. Update (acceptBomQuantityChanges, draft only) copies the new count.
  • orphaned: the line has no live count. It was hard-deleted, kept with orphaned_at, or is missing_from_source. Update removes the item.

Refresh status re-classifies items in every invoice status. It never writes a quantity or a price. The BOM shows the result through the UI-only lookup project_bom_lines.product_order_item_status.

Persistence

Airtable product_order_items, linked to product_order. There is also a UI-only bom_line link and copies of the BOM display facts.