From 3ffbb1cfc73f97f06dd8fa2b9ce1bc4d7e5cf4f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 08:56:57 +1100 Subject: [PATCH] Fix currency rendering (#9308) (#9310) - Closes https://github.com/inventree/InvenTree/issues/9300 (cherry picked from commit 4eaa5880c113032cbdbfcbf5dfc25597082cc2f5) Co-authored-by: Oliver --- src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx | 2 +- src/frontend/src/pages/sales/ReturnOrderDetail.tsx | 2 +- src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx | 2 +- src/frontend/src/tables/sales/ReturnOrderTable.tsx | 2 +- src/frontend/src/tables/sales/SalesOrderTable.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx b/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx index 4de604ba00..a99a1ed435 100644 --- a/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx +++ b/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx @@ -182,7 +182,7 @@ export default function PurchaseOrderDetail() { label: t`Total Cost`, value_formatter: () => { return formatCurrency(order?.total_price, { - currency: order?.order_currency ?? order?.supplier_detail?.currency + currency: order?.order_currency || order?.supplier_detail?.currency }); } } diff --git a/src/frontend/src/pages/sales/ReturnOrderDetail.tsx b/src/frontend/src/pages/sales/ReturnOrderDetail.tsx index b4202be69d..154e46ca21 100644 --- a/src/frontend/src/pages/sales/ReturnOrderDetail.tsx +++ b/src/frontend/src/pages/sales/ReturnOrderDetail.tsx @@ -146,7 +146,7 @@ export default function ReturnOrderDetail() { label: t`Total Cost`, value_formatter: () => { return formatCurrency(order?.total_price, { - currency: order?.order_currency ?? order?.customer_detail?.currency + currency: order?.order_currency || order?.customer_detail?.currency }); } } diff --git a/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx b/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx index 72c763b35d..229b116102 100644 --- a/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx +++ b/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx @@ -130,7 +130,7 @@ export function PurchaseOrderTable({ sortable: true, render: (record: any) => { return formatCurrency(record.total_price, { - currency: record.order_currency ?? record.supplier_detail?.currency + currency: record.order_currency || record.supplier_detail?.currency }); } }, diff --git a/src/frontend/src/tables/sales/ReturnOrderTable.tsx b/src/frontend/src/tables/sales/ReturnOrderTable.tsx index 6a5f6f9694..5e1f8b9a8a 100644 --- a/src/frontend/src/tables/sales/ReturnOrderTable.tsx +++ b/src/frontend/src/tables/sales/ReturnOrderTable.tsx @@ -139,7 +139,7 @@ export function ReturnOrderTable({ sortable: true, render: (record: any) => { return formatCurrency(record.total_price, { - currency: record.order_currency ?? record.customer_detail?.currency + currency: record.order_currency || record.customer_detail?.currency }); } } diff --git a/src/frontend/src/tables/sales/SalesOrderTable.tsx b/src/frontend/src/tables/sales/SalesOrderTable.tsx index 265ec9a214..b2aa7210e3 100644 --- a/src/frontend/src/tables/sales/SalesOrderTable.tsx +++ b/src/frontend/src/tables/sales/SalesOrderTable.tsx @@ -174,7 +174,7 @@ export function SalesOrderTable({ sortable: true, render: (record: any) => { return formatCurrency(record.total_price, { - currency: record.order_currency ?? record.customer_detail?.currency + currency: record.order_currency || record.customer_detail?.currency }); } }