mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[PUI] Tweak purchase order line table (#7656)
* Add "packaging" field to PO line table * Fixes for order detail pages
This commit is contained in:
parent
fc0a860e9b
commit
b96b8b8a04
@ -134,12 +134,6 @@ export default function PurchaseOrderDetail() {
|
||||
];
|
||||
|
||||
let tr: DetailsField[] = [
|
||||
{
|
||||
type: 'text',
|
||||
name: 'line_items',
|
||||
label: t`Line Items`,
|
||||
icon: 'list'
|
||||
},
|
||||
{
|
||||
type: 'progressbar',
|
||||
name: 'completed',
|
||||
@ -148,14 +142,6 @@ export default function PurchaseOrderDetail() {
|
||||
total: order.line_items,
|
||||
progress: order.completed_lines
|
||||
},
|
||||
{
|
||||
type: 'progressbar',
|
||||
name: 'shipments',
|
||||
icon: 'shipment',
|
||||
label: t`Completed Shipments`,
|
||||
total: order.shipments,
|
||||
progress: order.completed_shipments
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
name: 'currency',
|
||||
|
@ -106,12 +106,6 @@ export default function SalesOrderDetail() {
|
||||
];
|
||||
|
||||
let tr: DetailsField[] = [
|
||||
{
|
||||
type: 'text',
|
||||
name: 'line_items',
|
||||
label: t`Line Items`,
|
||||
icon: 'list'
|
||||
},
|
||||
{
|
||||
type: 'progressbar',
|
||||
name: 'completed',
|
||||
@ -126,8 +120,8 @@ export default function SalesOrderDetail() {
|
||||
icon: 'shipment',
|
||||
label: t`Completed Shipments`,
|
||||
total: order.shipments,
|
||||
progress: order.completed_shipments
|
||||
// TODO: Fix this progress bar
|
||||
progress: order.completed_shipments,
|
||||
hidden: !order.shipments
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
|
@ -23,6 +23,7 @@ import {
|
||||
import { useTable } from '../../hooks/UseTable';
|
||||
import { apiUrl } from '../../states/ApiState';
|
||||
import { useUserState } from '../../states/UserState';
|
||||
import { TableColumn } from '../Column';
|
||||
import {
|
||||
CurrencyColumn,
|
||||
LinkColumn,
|
||||
@ -65,7 +66,7 @@ export function PurchaseOrderLineItemTable({
|
||||
}
|
||||
});
|
||||
|
||||
const tableColumns = useMemo(() => {
|
||||
const tableColumns: TableColumn[] = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
accessor: 'part',
|
||||
@ -138,17 +139,21 @@ export function PurchaseOrderLineItemTable({
|
||||
)
|
||||
},
|
||||
{
|
||||
accessor: 'pack_quantity',
|
||||
accessor: 'supplier_part_detail.packaging',
|
||||
sortable: false,
|
||||
title: t`Pack Quantity`,
|
||||
render: (record: any) => record?.supplier_part_detail?.pack_quantity
|
||||
title: t`Packaging`
|
||||
},
|
||||
{
|
||||
accessor: 'SKU',
|
||||
accessor: 'supplier_part_detail.pack_quantity',
|
||||
sortable: false,
|
||||
title: t`Pack Quantity`
|
||||
},
|
||||
{
|
||||
accessor: 'supplier_part_detail.SKU',
|
||||
title: t`Supplier Code`,
|
||||
switchable: false,
|
||||
sortable: true,
|
||||
render: (record: any) => record?.supplier_part_detail?.SKU
|
||||
ordering: 'SKU'
|
||||
},
|
||||
{
|
||||
accessor: 'supplier_link',
|
||||
|
Loading…
Reference in New Issue
Block a user