mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-13 14:11:37 +00:00
Improved formatting (#10284)
- Use decimal formatting functions for more places in the UI
This commit is contained in:
@@ -325,7 +325,7 @@ export function BomTable({
|
|||||||
if (on_order > 0) {
|
if (on_order > 0) {
|
||||||
extra.push(
|
extra.push(
|
||||||
<Text key='on_order'>
|
<Text key='on_order'>
|
||||||
{t`On order`}: {on_order}
|
{t`On order`}: {formatDecimal(on_order)}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -333,7 +333,7 @@ export function BomTable({
|
|||||||
if (building > 0) {
|
if (building > 0) {
|
||||||
extra.push(
|
extra.push(
|
||||||
<Text key='building'>
|
<Text key='building'>
|
||||||
{t`Building`}: {building}
|
{t`Building`}: {formatDecimal(building)}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ import type { TableFilter } from '@lib/types/Filters';
|
|||||||
import type { TableColumn } from '@lib/types/Tables';
|
import type { TableColumn } from '@lib/types/Tables';
|
||||||
import { RenderPart } from '../../components/render/Part';
|
import { RenderPart } from '../../components/render/Part';
|
||||||
import OrderPartsWizard from '../../components/wizards/OrderPartsWizard';
|
import OrderPartsWizard from '../../components/wizards/OrderPartsWizard';
|
||||||
import { formatCurrency } from '../../defaults/formatters';
|
import { formatCurrency, formatDecimal } from '../../defaults/formatters';
|
||||||
import { useBuildOrderFields } from '../../forms/BuildForms';
|
import { useBuildOrderFields } from '../../forms/BuildForms';
|
||||||
import {
|
import {
|
||||||
useAllocateToSalesOrderForm,
|
useAllocateToSalesOrderForm,
|
||||||
@@ -149,7 +149,7 @@ export default function SalesOrderLineItemTable({
|
|||||||
);
|
);
|
||||||
|
|
||||||
let color: string | undefined = undefined;
|
let color: string | undefined = undefined;
|
||||||
let text = `${available}`;
|
let text = `${formatDecimal(available)}`;
|
||||||
|
|
||||||
const extra: ReactNode[] = [];
|
const extra: ReactNode[] = [];
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ export default function SalesOrderLineItemTable({
|
|||||||
if (record.building > 0) {
|
if (record.building > 0) {
|
||||||
extra.push(
|
extra.push(
|
||||||
<Text size='sm'>
|
<Text size='sm'>
|
||||||
{t`In production`}: {record.building}
|
{t`In production`}: {formatDecimal(record.building)}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ export default function SalesOrderLineItemTable({
|
|||||||
if (record.on_order > 0) {
|
if (record.on_order > 0) {
|
||||||
extra.push(
|
extra.push(
|
||||||
<Text size='sm'>
|
<Text size='sm'>
|
||||||
{t`On order`}: {record.on_order}
|
{t`On order`}: {formatDecimal(record.on_order)}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user