Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

492 B
Raw Blame
-- Third sales-family surface: sales invoice lines. An invoice can be raised
-- with no upstream quote or order, so without this surface a restricted item
-- invoiced directly reaches revenue having passed no gate.
--
-- ALTER TYPE ... ADD VALUE cannot be used by other statements in the same
-- transaction, so the CHECK-constraint widening lives in the follow-up
-- migration (sales-invoice-rule-enforcement).
ALTER TYPE "enforcementRuleSurface" ADD VALUE IF NOT EXISTS 'salesInvoiceLine';