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
refactor: redefine job quantity retrieval function
naveenkasha23fe68c79db
diff --git a/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql b/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sqlindex e020e445d4..cd81cb5582 100644--- a/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql+++ b/packages/database/supabase/migrations/20260612134529_job-quantity-on-hand-null-storage-unit.sql@@ -15,6 +15,7 @@-- app-side PENDING_PO_SUPPLY_STATUSES so the Incoming column and shortfall-- agree and the purchase-unit conversion is applied.+DROP FUNCTION IF EXISTS get_job_quantity_on_hand;CREATE OR REPLACE FUNCTION get_job_quantity_on_hand(job_id TEXT, company_id TEXT, location_id TEXT)RETURNS TABLE ("id" TEXT,