Fix currency rendering (#9308)

- Closes https://github.com/inventree/InvenTree/issues/9300
This commit is contained in:
Oliver authored and GitHub committed 2025-03-16 07:42:34 +11:00
1 parent e1ac1c77c0
commit 4eaa5880c1
5 files changed
+5 -5

No files matched your search

@@ -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
});
}
}
@@ -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
});
}
}
@@ -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
});
}
},
@@ -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
});
}
}
@@ -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
});
}
}