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: copy costs on quote revisioning

Brad Barbindddc5bf832f6
diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx
index ac26a6740c..1360e3c311 100644
--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQHeader.tsx
@@ -426,7 +426,7 @@ function ConvertToQuoteModal({
<li key={line.id}>
{line.customerPartId}
{line.customerPartRevision &&
- `-${line.customerPartRevision}`}
+ `.${line.customerPartRevision}`}
</li>
))}
</ul>
diff --git a/packages/database/supabase/functions/get-method/index.ts b/packages/database/supabase/functions/get-method/index.ts
index 594038f9cb..28793011b1 100644
--- a/packages/database/supabase/functions/get-method/index.ts
+++ b/packages/database/supabase/functions/get-method/index.ts
@@ -3786,6 +3786,7 @@ serve(async (req: Request) => {
],
quantity: child.data.quantity,
unitOfMeasureCode: child.data.unitOfMeasureCode,
+ unitCost: child.data.unitCost, // TODO: get unit cost
companyId,
createdBy: userId,
customFields: {},
@@ -3849,8 +3850,10 @@ serve(async (req: Request) => {
setupUnit: op.setupUnit,
laborTime: op.laborTime,
laborUnit: op.laborUnit,
+ laborRate: op.laborRate,
machineTime: op.machineTime,
machineUnit: op.machineUnit,
+ machineRate: op.machineRate,
order: op.order,
operationOrder: op.operationOrder,
operationType: op.operationType,
@@ -3858,6 +3861,7 @@ serve(async (req: Request) => {
operationMinimumCost: op.operationMinimumCost ?? 0,
operationLeadTime: op.operationLeadTime ?? 0,
operationUnitCost: op.operationUnitCost ?? 0,
+ overheadRate: op.overheadRate,
tags: op.tags ?? [],
workInstruction: op.workInstruction,
companyId,
@@ -4257,6 +4261,7 @@ serve(async (req: Request) => {
child.data.quoteMakeMethodId
],
quantity: child.data.quantity,
+ unitCost: child.data.unitCost, // TODO: get unit cost
unitOfMeasureCode: child.data.unitOfMeasureCode,
companyId,
createdBy: userId,
@@ -4323,8 +4328,10 @@ serve(async (req: Request) => {
setupUnit: op.setupUnit,
laborTime: op.laborTime,
laborUnit: op.laborUnit,
+ laborRate: op.laborRate,
machineTime: op.machineTime,
machineUnit: op.machineUnit,
+ machineRate: op.machineRate,
order: op.order,
operationOrder: op.operationOrder,
operationType: op.operationType,
@@ -4332,6 +4339,7 @@ serve(async (req: Request) => {
operationMinimumCost: op.operationMinimumCost ?? 0,
operationLeadTime: op.operationLeadTime ?? 0,
operationUnitCost: op.operationUnitCost ?? 0,
+ overheadRate: op.overheadRate,
tags: op.tags ?? [],
workInstruction: op.workInstruction,
companyId,