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
Split Add-Ons into Shipping and Fees columns
Sidwebworks815cca6c769a
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsxindex a98c3bb355..f4203df036 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx@@ -316,6 +316,13 @@ const LinePricingOptions = ({});});+ const hasAnyShipping = options.some(+ (option) => (option.convertedShippingCost ?? 0) > 0+ );+ const hasAnyFees = options.some(+ (option) => (convertedAdditionalChargesByQuantity[option.quantity] ?? 0) > 0+ );+return (<VStack spacing={4}><RadioGroup@@ -365,7 +372,8 @@ const LinePricingOptions = ({<Th>Quantity</Th><Th>Unit Price</Th><Th>Discount</Th>- <Th>Add-Ons</Th>+ {hasAnyShipping && <Th>Shipping</Th>}+ {hasAnyFees && <Th>Fees</Th>}<Th>Lead Time</Th><Th>Subtotal</Th></Tr>@@ -373,7 +381,10 @@ const LinePricingOptions = ({<Tbody>{!Array.isArray(options) || options.length === 0 ? (<Tr>- <Td colSpan={6} className="text-center py-8">+ <Td+ colSpan={5 + (hasAnyShipping ? 1 : 0) + (hasAnyFees ? 1 : 0)}+ className="text-center py-8"+ >No pricing options found</Td></Tr>@@ -404,13 +415,28 @@ const LinePricingOptions = ({? percentFormatter.format(option.discountPercent): "-"}</Td>- <Td>- {formatter.format(- convertedAdditionalChargesByQuantity[+ {hasAnyShipping && (+ <Td>+ {(option.convertedShippingCost ?? 0) > 0+ ? formatter.format(+ option.convertedShippingCost ?? 0+ )+ : "-"}+ </Td>+ )}+ {hasAnyFees && (+ <Td>+ {(convertedAdditionalChargesByQuantity[option.quantity- ] + (option.convertedShippingCost ?? 0)- )}- </Td>+ ] ?? 0) > 0+ ? formatter.format(+ convertedAdditionalChargesByQuantity[+ option.quantity+ ]+ )+ : "-"}+ </Td>+ )}<Td>{new Intl.NumberFormat(locale, {style: "unit",diff --git a/apps/erp/app/routes/share+/quote.$id.tsx b/apps/erp/app/routes/share+/quote.$id.tsxindex 039b746f82..ee34d6769f 100644--- a/apps/erp/app/routes/share+/quote.$id.tsx+++ b/apps/erp/app/routes/share+/quote.$id.tsx@@ -92,7 +92,7 @@ enum QuoteState {const translations = {en: {"Accept Quote": "Accept Quote",- "Add-Ons": "Add-Ons",+ Fees: "Fees","Are you sure you want to accept this quote?": (id: string,amount: string@@ -132,7 +132,7 @@ const translations = {},es: {"Accept Quote": "Aceptar Cotización",- "Add-Ons": "Complementos",+ Fees: "Tarifas","Are you sure you want to accept this quote?": (id: string,amount: string@@ -175,7 +175,7 @@ const translations = {},de: {"Accept Quote": "Angebot Annehmen",- "Add-Ons": "Zusätze",+ Fees: "Gebühren","Are you sure you want to accept this quote?": (id: string,amount: string@@ -696,11 +696,11 @@ const LinePricingOptions = ({);const hasAnyDiscount = options.some((option) => option.discountPercent > 0);- const hasAnyAddOns = options.some(- (option) =>- (convertedAdditionalChargesByQuantity[option.quantity] ?? 0) +- (option.convertedShippingCost ?? 0) >- 0+ const hasAnyShipping = options.some(+ (option) => (option.convertedShippingCost ?? 0) > 0+ );+ const hasAnyFees = options.some(+ (option) => (convertedAdditionalChargesByQuantity[option.quantity] ?? 0) > 0);return (@@ -752,7 +752,8 @@ const LinePricingOptions = ({<Th>{strings.Quantity}</Th><Th>{strings["Unit Price"]}</Th>{hasAnyDiscount && <Th>Discount</Th>}- {hasAnyAddOns && <Th>{strings["Add-Ons"]}</Th>}+ {hasAnyShipping && <Th>{strings.Shipping}</Th>}+ {hasAnyFees && <Th>{strings.Fees}</Th>}<Th>{strings["Lead Time"]}</Th><Th>{strings.Subtotal}</Th></Tr>@@ -762,7 +763,10 @@ const LinePricingOptions = ({<Tr><TdcolSpan={- 5 + (hasAnyDiscount ? 1 : 0) + (hasAnyAddOns ? 1 : 0)+ 5 ++ (hasAnyDiscount ? 1 : 0) ++ (hasAnyShipping ? 1 : 0) ++ (hasAnyFees ? 1 : 0)}className="text-center py-8">@@ -800,13 +804,26 @@ const LinePricingOptions = ({: "-"}</Td>)}- {hasAnyAddOns && (+ {hasAnyShipping && (<Td>- {formatter.format(- convertedAdditionalChargesByQuantity[- option.quantity- ] + (option.convertedShippingCost ?? 0)- )}+ {(option.convertedShippingCost ?? 0) > 0+ ? formatter.format(+ option.convertedShippingCost ?? 0+ )+ : "-"}+ </Td>+ )}+ {hasAnyFees && (+ <Td>+ {(convertedAdditionalChargesByQuantity[+ option.quantity+ ] ?? 0) > 0+ ? formatter.format(+ convertedAdditionalChargesByQuantity[+ option.quantity+ ]+ )+ : "-"}</Td>)}<Td>