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
Merge remote-tracking branch 'origin/main' into fix/sales-quote-quantity-ordering
aashuc49ccfbaac2c
diff --cc packages/documents/src/pdf/QuotePDF.tsxindex 72ebc1af1d,2d7dc51a75..290dc38f0a--- a/packages/documents/src/pdf/QuotePDF.tsx+++ b/packages/documents/src/pdf/QuotePDF.tsx@@@ -72,6 -67,14 +67,23 @@@ const QuotePDF = (!!currencyCode && currencyCode !== company.baseCurrencyCode;const numberFormatter = getMoneyFormatter(locale, currencyDecimals);+ // A No Quote line is the company's own decision not to bid — the customer+ // never sees it, its prices, or its lead time.- const quoteLines = allQuoteLines.filter((line) => line.status !== "No Quote");++ // Quantity breaks are stored in entry order; the PDF renders them++ // least-to-most, and the single-quantity totals below use the smallest++ // break — matching the in-app summary and the share page, which sort too.++ const quoteLines = allQuoteLines++ .filter((line) => line.status !== "No Quote")++ .map((line) =>++ line.quantity++ ? { ...line, quantity: [...line.quantity].sort((a, b) => a - b) }++ : line++ );+ const quotedLineIds = new Set(quoteLines.map((line) => line.id));+ const quoteLinePrices = allQuoteLinePrices.filter((price) =>+ quotedLineIds.has(price.quoteLineId)+ );+const pricesByLine = quoteLinePrices.reduce<Record<string, QuoteLinePrice[]>>((acc, price) => {(acc[price.quoteLineId] ??= []).push(price);