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
style: move markup percent above unit price
Brad Barbinb0c841389472
diff --git a/apps/carbon/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx b/apps/carbon/app/modules/sales/ui/Quotes/QuoteLinePricing.tsxindex ecd382862c..7b2b11452d 100644--- a/apps/carbon/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx+++ b/apps/carbon/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx@@ -344,23 +344,37 @@ const QuoteLinePricing = ({<Tr><Td className="border-r border-border"><HStack className="w-full justify-between ">- <span>Unit Price</span>+ <span className="flex items-center justify-start gap-2">+ Markup Percent+ <Tooltip>+ <TooltipTrigger>+ <LuInfo className="w-4 h-4" />+ </TooltipTrigger>+ <TooltipContent>(Price - Cost) / Cost</TooltipContent>+ </Tooltip>+ </span></HStack></Td>- {quantities.map((quantity) => {- const price = prices[quantity]?.unitPrice;+ {quantities.map((quantity, index) => {+ const price = prices[quantity]?.unitPrice ?? 0;+ const cost = unitCostsByQuantity[index];++ const markup = price ? (price - cost) / cost : 0;+return (<Td key={quantity.toString()}><NumberField- value={price}+ value={markup}formatOptions={{- style: "currency",- currency: "USD",+ style: "percent",}}- minValue={0}onChange={(value) => {if (Number.isFinite(value) && value !== price) {- onUpdatePrice("unitPrice", quantity, value);+ onUpdatePrice(+ "unitPrice",+ quantity,+ cost * (1 + value)+ );}}}>@@ -378,37 +392,23 @@ const QuoteLinePricing = ({<Tr><Td className="border-r border-border"><HStack className="w-full justify-between ">- <span className="flex items-center justify-start gap-2">- Markup Percent- <Tooltip>- <TooltipTrigger>- <LuInfo className="w-4 h-4" />- </TooltipTrigger>- <TooltipContent>(Price - Cost) / Cost</TooltipContent>- </Tooltip>- </span>+ <span>Unit Price</span></HStack></Td>- {quantities.map((quantity, index) => {- const price = prices[quantity]?.unitPrice ?? 0;- const cost = unitCostsByQuantity[index];-- const markup = price ? (price - cost) / cost : 0;-+ {quantities.map((quantity) => {+ const price = prices[quantity]?.unitPrice;return (<Td key={quantity.toString()}><NumberField- value={markup}+ value={price}formatOptions={{- style: "percent",+ style: "currency",+ currency: "USD",}}+ minValue={0}onChange={(value) => {if (Number.isFinite(value) && value !== price) {- onUpdatePrice(- "unitPrice",- quantity,- cost * (1 + value)- );+ onUpdatePrice("unitPrice", quantity, value);}}}>@@ -423,6 +423,7 @@ const QuoteLinePricing = ({);})}</Tr>+<Tr><Td className="border-r border-border"><HStack className="w-full justify-between ">