From 2ac381b4dc550e47479157859e6b9956955051ba Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 9 Sep 2025 06:32:17 +1000 Subject: [PATCH] Improved formatting (#10284) - Use decimal formatting functions for more places in the UI --- src/frontend/src/tables/bom/BomTable.tsx | 4 ++-- src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/tables/bom/BomTable.tsx b/src/frontend/src/tables/bom/BomTable.tsx index 94e9dd81a4..194d696e42 100644 --- a/src/frontend/src/tables/bom/BomTable.tsx +++ b/src/frontend/src/tables/bom/BomTable.tsx @@ -325,7 +325,7 @@ export function BomTable({ if (on_order > 0) { extra.push( - {t`On order`}: {on_order} + {t`On order`}: {formatDecimal(on_order)} ); } @@ -333,7 +333,7 @@ export function BomTable({ if (building > 0) { extra.push( - {t`Building`}: {building} + {t`Building`}: {formatDecimal(building)} ); } diff --git a/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx b/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx index d3ef56c844..336f55b1b9 100644 --- a/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx +++ b/src/frontend/src/tables/sales/SalesOrderLineItemTable.tsx @@ -29,7 +29,7 @@ import type { TableFilter } from '@lib/types/Filters'; import type { TableColumn } from '@lib/types/Tables'; import { RenderPart } from '../../components/render/Part'; import OrderPartsWizard from '../../components/wizards/OrderPartsWizard'; -import { formatCurrency } from '../../defaults/formatters'; +import { formatCurrency, formatDecimal } from '../../defaults/formatters'; import { useBuildOrderFields } from '../../forms/BuildForms'; import { useAllocateToSalesOrderForm, @@ -149,7 +149,7 @@ export default function SalesOrderLineItemTable({ ); let color: string | undefined = undefined; - let text = `${available}`; + let text = `${formatDecimal(available)}`; const extra: ReactNode[] = []; @@ -167,7 +167,7 @@ export default function SalesOrderLineItemTable({ if (record.building > 0) { extra.push( - {t`In production`}: {record.building} + {t`In production`}: {formatDecimal(record.building)} ); } @@ -175,7 +175,7 @@ export default function SalesOrderLineItemTable({ if (record.on_order > 0) { extra.push( - {t`On order`}: {record.on_order} + {t`On order`}: {formatDecimal(record.on_order)} ); }