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: add add-on-cost to sales order pdf

Brad Barbina0e5e33dab33
diff --git a/packages/documents/src/pdf/SalesOrderPDF.tsx b/packages/documents/src/pdf/SalesOrderPDF.tsx
index f50d125e77..b2dc483cdb 100644
--- a/packages/documents/src/pdf/SalesOrderPDF.tsx
+++ b/packages/documents/src/pdf/SalesOrderPDF.tsx
@@ -155,10 +155,11 @@ const SalesOrderPDF = ({
"flex flex-row justify-between items-center mt-5 py-1.5 px-[6px] border-t border-b border-gray-300 font-bold text-gray-500 uppercase"
)}
>
- <Text style={tw("w-1/2 text-left")}>Description</Text>
+ <Text style={tw("w-5/12 text-left")}>Description</Text>
<Text style={tw("w-1/6 text-right")}>Qty</Text>
<Text style={tw("w-1/6 text-right")}>Price</Text>
- <Text style={tw("w-1/5 text-right")}>Total</Text>
+ <Text style={tw("w-1/6 text-right")}>Add-On Cost</Text>
+ <Text style={tw("w-1/6 text-right")}>Total</Text>
</View>
{salesOrderLines.map((line) => (
<View
@@ -167,7 +168,7 @@ const SalesOrderPDF = ({
)}
key={line.id}
>
- <View style={tw("w-1/2")}>
+ <View style={tw("w-5/12")}>
<Text style={tw("font-bold mb-1")}>
{getLineDescription(line)}
</Text>
@@ -185,7 +186,12 @@ const SalesOrderPDF = ({
? null
: formatter.format(line.unitPrice ?? 0)}
</Text>
- <Text style={tw("w-1/5 text-right")}>
+ <Text style={tw("w-1/6 text-right")}>
+ {line.salesOrderLineType === "Comment"
+ ? null
+ : formatter.format(line.addOnCost ?? 0)}
+ </Text>
+ <Text style={tw("w-1/6 text-right")}>
{line.salesOrderLineType === "Comment"
? null
: formatter.format(getLineTotal(line))}