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: markup calculation on purchased quoted part

Brad Barbin0bbe1d5e32f3
diff --git a/apps/erp/app/components/SearchFilter.tsx b/apps/erp/app/components/SearchFilter.tsx
index 37c2852a63..82d94764c1 100644
--- a/apps/erp/app/components/SearchFilter.tsx
+++ b/apps/erp/app/components/SearchFilter.tsx
@@ -17,7 +17,7 @@ const SearchFilter = ({ param, size, ...props }: SearchFilterProps) => {
const [params, setParams] = useUrlParams();
const [query, setQuery] = useState(params.get(param) || "");
const debounceQuery = useDebounce((q: string) => {
- setParams({ [param]: q });
+ setParams({ [param]: q, offset: null, limit: null });
}, 500);
return (
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx
index 342d32e6e8..12863c80c6 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteLinePricing.tsx
@@ -311,9 +311,11 @@ const QuoteLinePricing = ({
};
});
- const unitCostsByQuantity = costsByQuantity.map((costs) =>
- Object.values(costs).reduce((sum, v) => sum + v, 0)
- );
+ const unitCostsByQuantity = hasCalculatedCost
+ ? costsByQuantity.map((costs) =>
+ Object.values(costs).reduce((sum, v) => sum + v, 0)
+ )
+ : quantities.map(() => editableFields.unitCost);
const computeUnitPriceFromMarkups = useCallback(
(