From 4eaa5880c113032cbdbfcbf5dfc25597082cc2f5 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 16 Mar 2025 07:42:34 +1100 Subject: [PATCH] Fix currency rendering (#9308) - Closes https://github.com/inventree/InvenTree/issues/9300 --- 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 e2ec609919..d6007f40e3 100644 --- a/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx +++ b/src/frontend/src/pages/purchasing/PurchaseOrderDetail.tsx @@ -191,7 +191,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 a19e9ade3a..9aec9db706 100644 --- a/src/frontend/src/pages/sales/ReturnOrderDetail.tsx +++ b/src/frontend/src/pages/sales/ReturnOrderDetail.tsx @@ -155,7 +155,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 c1a27e6a13..aaddcd08d7 100644 --- a/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx +++ b/src/frontend/src/tables/purchasing/PurchaseOrderTable.tsx @@ -135,7 +135,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 6101f28505..3b3725a0fd 100644 --- a/src/frontend/src/tables/sales/ReturnOrderTable.tsx +++ b/src/frontend/src/tables/sales/ReturnOrderTable.tsx @@ -144,7 +144,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 acae06c1da..d0d02f5b4d 100644 --- a/src/frontend/src/tables/sales/SalesOrderTable.tsx +++ b/src/frontend/src/tables/sales/SalesOrderTable.tsx @@ -179,7 +179,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 }); } }