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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
MRP tester fixes (confirmed items)
Source: tester report of 2026-10-12, verified read-only the same day. Fixes the five items that were confirmed in code. Not in scope: #8 (dependent demand is lead-time-offset twice — needs a decision on what a demand period means), #4/#5 remaining gaps (supplier-part order multiple, batch size under Fixed Reorder Quantity, Increase rounding — product calls).
Tasks
- #6 Max order quantity splits, never clamps —
packages/utils/src/planning-sizing.tsDemand-Based Reorder: size the window need (min, then multiple), then split it into orders ofperOrder = min(lotSize, maximumOrderQuantity)(zeros ignored; floored to the order multiple when one is set).orderSizingRulesreturns the sameperOrderso the pages'splitIntoOrdersround-trips. SQL twincalculate_quantity_to_orderdrops theLEAST(total, max)clamp (new migration). Tests:planning-sizing.test.ts(replace the "capped to 30" pin),planned-orders-from-actions.test.ts. - #7 Legend toggles drive the projection line —
ItemPlanningChart.tsxchartDatareadshiddenSeries; a hidden series contributes 0 to the running projection and to stockout / below-safety detection. Pure helper + test inplanningSupplyDemand.ts. - #9 PO due date in the Supply & Demand list —
getOpenPurchaseOrderLinesselectspromisedDate,dueDate(required),orderDate,leadTime; the forecast route derives the row date withpurchaseOrderLineArrivalDate(exported from@carbon/planning). - #2 Chart bars from live open orders — the forecast route buckets
openPurchaseOrderLines/openProductionOrdersinto periods by the same dates MRP uses (purchaseOrderLineArrivalDate,jobCompletionDate, before today → first week, past horizon → dropped) instead of readingsupplyActual+supplyForecast. PurebucketSupplyByPeriod+ test. Chart sums per (period, source) instead of assigning. - #10 Surplus-only items reach the engine and the screen — new migration
re-creating
get_production_planningandget_purchasing_planningwith the item predicate widened:OR EXISTS (supply_data with supply > 0). - Rules:
.claude/rules/mrp-system.md(lot-sizing claim, RPC predicate, chart source). - Verify:
pnpm --filter @carbon/utils test,pnpm --filter erp test planningSupplyDemand, scoped typecheck (utils, planning, erp), biome. Migrations cannot be applied here (local Supabase down) — flag.