Skip to content

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.

fix: sort quote to order drawer quantities

Brad Barbin6201cbf4e1e2
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteToOrderDrawer.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteToOrderDrawer.tsx
index 58ad6507e8..cd4a8a1743 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteToOrderDrawer.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteToOrderDrawer.tsx
@@ -483,6 +483,9 @@ const LinePricingOptions = ({
return acc;
}, {});
+ // Sort options by quantity from least to greatest
+ const sortedOptions = [...options].sort((a, b) => a.quantity - b.quantity);
+
return (
<VStack spacing={2}>
<RadioGroup
@@ -538,7 +541,7 @@ const LinePricingOptions = ({
</Td>
</Tr>
) : (
- options.map(
+ sortedOptions.map(
(option, index) =>
line?.quantity?.includes(option.quantity) && (
<Tr key={index}>