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(invoicing): stop converting the base-currency shipping on the invoice summary (#1532)
BettrCallRaul79b21fccafab
diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsxindex 6068a04760..9b9763b24e 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx@@ -413,9 +413,11 @@ const SalesInvoiceSummary = ({return acc + lineTaxAmount;}, 0) ?? 0;- const shippingCost =- (routeData?.salesInvoiceShipment?.shippingCost ?? 0) *- (routeData?.salesInvoice?.exchangeRate ?? 1);+ // `salesInvoiceShipment.shippingCost` is stored in BASE currency, like every+ // other raw column on this side -- the `salesInvoices` view adds it straight+ // onto a base subtotal built from `unitPrice`. So the base figure is the+ // stored value and only the customer-facing one converts.+ const shippingCost = routeData?.salesInvoiceShipment?.shippingCost ?? 0;const customerShippingCost =(routeData?.salesInvoiceShipment?.shippingCost ?? 0) *