01An inspection belongs to the product line, not the order
The first model hung an inspection report on the purchase order. But an order holds many products, and the same product can be inspected more than once, so the report moved to the order's line item: one order, many products; one product, many inspections. The change went through the API, the panel and the app together.
The per-unit rows changed for the same reason. They used to be created for every unit in the order when it was confirmed, so a 2,000-unit order made 2,000 rows for an inspection that checks a sample. Now the rows are created at the production-control stage, one for each unit the inspector will actually check, and the inspected quantity must be at least one and no more than the order holds.
Moving the link mid-project meant migrating the schema and updating the API, the panel and the app at once.
