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.

feat: adding description for additional charges (#522)

Gaurav Bhatt60eabbcdf3c5
diff --git a/packages/documents/src/pdf/QuotePDF.tsx b/packages/documents/src/pdf/QuotePDF.tsx
index 8426f54761..8687029bcd 100644
--- a/packages/documents/src/pdf/QuotePDF.tsx
+++ b/packages/documents/src/pdf/QuotePDF.tsx
@@ -353,6 +353,42 @@ const QuotePDF = ({
/>
</View>
)}
+ {totalTaxAndFees > 0 && (
+ <View style={tw("mt-1")}>
+ <Text
+ style={tw("text-[8px] text-gray-400 font-bold")}
+ >
+ Tax & Fees
+ </Text>
+ {(price?.convertedShippingCost ?? 0) > 0 && (
+ <Text style={tw("text-[8px] text-gray-400")}>
+ - Shipping
+ </Text>
+ )}
+ {Object.values(additionalCharges)
+ .filter(
+ (charge) =>
+ charge.description &&
+ (charge.amounts?.[quantity] ?? 0) > 0
+ )
+ .sort((a, b) =>
+ a.description.localeCompare(b.description)
+ )
+ .map((charge) => (
+ <Text
+ key={charge.description}
+ style={tw("text-[8px] text-gray-400")}
+ >
+ - {charge.description}
+ </Text>
+ ))}
+ {taxPercent > 0 && (
+ <Text style={tw("text-[8px] text-gray-400")}>
+ - Tax ({(taxPercent * 100).toFixed(0)}%)
+ </Text>
+ )}
+ </View>
+ )}
</View>
<View style={tw("w-2/3 flex flex-row")}>
<Text
@@ -388,7 +424,9 @@ const QuotePDF = ({
`${colWidth} text-right text-gray-600 pr-3`
)}
>
- {leadTime > 0 ? `${leadTime} ${pluralize(leadTime, "day")}` : "-"}
+ {leadTime > 0
+ ? `${leadTime} ${pluralize(leadTime, "day")}`
+ : "-"}
</Text>
)}
<Text