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.

refactor: add logging to purchase order pdf

Brad Barbin6cfaf419ffda
diff --git a/packages/documents/src/pdf/PurchaseOrderPDF.tsx b/packages/documents/src/pdf/PurchaseOrderPDF.tsx
index ac7d3f73aa..3fd159105f 100644
--- a/packages/documents/src/pdf/PurchaseOrderPDF.tsx
+++ b/packages/documents/src/pdf/PurchaseOrderPDF.tsx
@@ -72,7 +72,12 @@ const PurchaseOrderPDF = ({
customerCountryName,
} = purchaseOrderLocations;
- const formatter = getCurrencyFormatter(purchaseOrder.currencyCode, locale);
+ console.log({ purchaseOrderLines });
+
+ const formatter = getCurrencyFormatter(
+ purchaseOrder.currencyCode ?? company.baseCurrencyCode ?? "USD",
+ locale
+ );
const taxAmount = purchaseOrderLines.reduce(
(acc, line) => acc + (line.supplierTaxAmount ?? 0),
0