2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-11-13 11:26:42 +00:00

Improved formatting (#10284) (#10292)

- Use decimal formatting functions for more places in the UI

(cherry picked from commit 2ac381b4dc)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot]
2025-09-09 06:41:56 +10:00
committed by GitHub
parent a916e501c3
commit 8571a42981
2 changed files with 6 additions and 6 deletions

View File

@@ -325,7 +325,7 @@ export function BomTable({
if (on_order > 0) {
extra.push(
<Text key='on_order'>
{t`On order`}: {on_order}
{t`On order`}: {formatDecimal(on_order)}
</Text>
);
}
@@ -333,7 +333,7 @@ export function BomTable({
if (building > 0) {
extra.push(
<Text key='building'>
{t`Building`}: {building}
{t`Building`}: {formatDecimal(building)}
</Text>
);
}

View File

@@ -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(
<Text size='sm'>
{t`In production`}: {record.building}
{t`In production`}: {formatDecimal(record.building)}
</Text>
);
}
@@ -175,7 +175,7 @@ export default function SalesOrderLineItemTable({
if (record.on_order > 0) {
extra.push(
<Text size='sm'>
{t`On order`}: {record.on_order}
{t`On order`}: {formatDecimal(record.on_order)}
</Text>
);
}