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
fix: initial selected price on quote must be a valid quantity
Brad Barbin32377abbcfe6
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsxindex 45d512e881..974659df98 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx@@ -585,7 +585,11 @@ const QuoteSummary = ({price.quoteLineId === salesOrderLine.id &&price.quantity === salesOrderLine.saleQuantity)- : routeData?.prices?.find((price) => price.quoteLineId === line.id);+ : routeData?.prices?.find(+ (price) =>+ price.quoteLineId === line.id &&+ line.quantity?.includes(price.quantity)+ );if (!line.id) {return acc;}diff --git a/apps/erp/app/routes/share+/quote.$id.tsx b/apps/erp/app/routes/share+/quote.$id.tsxindex b2bc533b7e..ea855a2a68 100644--- a/apps/erp/app/routes/share+/quote.$id.tsx+++ b/apps/erp/app/routes/share+/quote.$id.tsx@@ -1004,7 +1004,12 @@ const Quote = ({price.quoteLineId === salesOrderLine.id &&price.quantity === salesOrderLine.saleQuantity)- : quoteLinePrices?.find((price) => price.quoteLineId === line.id);+ : quoteLinePrices?.find(+ (price) =>+ price.quoteLineId === line.id &&+ line.quantity?.includes(price.quantity)+ );+if (!line.id) {return acc;}@@ -1086,6 +1091,8 @@ const Quote = ({maxSize: 25 * 1024 * 1024, // 25MB limit});+ console.log({ selectedLines });+return (<VStack spacing={8} className="w-full items-center p-2 md:p-8">{logo && (