mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-03 15:52:51 +00:00
[UI] Fix total price for Purchase Order table (#10450)
- Closes https://github.com/inventree/InvenTree/issues/10442
This commit is contained in:
@@ -23,6 +23,7 @@ import type { TableColumn } from '@lib/types/Tables';
|
|||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import ImporterDrawer from '../../components/importer/ImporterDrawer';
|
import ImporterDrawer from '../../components/importer/ImporterDrawer';
|
||||||
import { RenderInstance } from '../../components/render/Instance';
|
import { RenderInstance } from '../../components/render/Instance';
|
||||||
|
import { formatCurrency } from '../../defaults/formatters';
|
||||||
import { dataImporterSessionFields } from '../../forms/ImporterForms';
|
import { dataImporterSessionFields } from '../../forms/ImporterForms';
|
||||||
import {
|
import {
|
||||||
usePurchaseOrderLineItemFields,
|
usePurchaseOrderLineItemFields,
|
||||||
@@ -249,11 +250,15 @@ export function PurchaseOrderLineItemTable({
|
|||||||
accessor: 'purchase_price',
|
accessor: 'purchase_price',
|
||||||
title: t`Unit Price`
|
title: t`Unit Price`
|
||||||
}),
|
}),
|
||||||
CurrencyColumn({
|
{
|
||||||
accessor: 'total_price',
|
accessor: 'total_price',
|
||||||
currency_accessor: 'purchase_price_currency',
|
title: t`Total Price`,
|
||||||
title: t`Total Price`
|
render: (record: any) =>
|
||||||
}),
|
formatCurrency(record.purchase_price, {
|
||||||
|
currency: record.purchase_price_currency,
|
||||||
|
multiplier: record.quantity
|
||||||
|
})
|
||||||
|
},
|
||||||
TargetDateColumn({}),
|
TargetDateColumn({}),
|
||||||
LocationColumn({
|
LocationColumn({
|
||||||
accessor: 'destination_detail',
|
accessor: 'destination_detail',
|
||||||
|
Reference in New Issue
Block a user