2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

[PUI] stock table (#8396)

* [PUI] Add extra fields to StockItemTable

* Add SKU and MPN to StockItem export data

* Enable sorting

* Bump API version
This commit is contained in:
Oliver
2024-10-31 12:34:28 +11:00
committed by GitHub
parent a826096e37
commit 8822194b0d
4 changed files with 70 additions and 38 deletions

View File

@ -217,24 +217,26 @@ function stockItemTableColumns(): TableColumn[] {
LocationColumn({
accessor: 'location_detail'
}),
DateColumn({
accessor: 'stocktake_date',
title: t`Stocktake Date`,
{
accessor: 'purchase_order',
title: t`Purchase Order`,
render: (record: any) => {
return record.purchase_order_reference;
}
},
{
accessor: 'SKU',
title: t`Supplier Part`,
sortable: true
}),
DateColumn({
title: t`Expiry Date`,
accessor: 'expiry_date',
hidden: !useGlobalSettingsState.getState().isSet('STOCK_ENABLE_EXPIRY')
}),
DateColumn({
title: t`Last Updated`,
accessor: 'updated'
}),
// TODO: purchase order
// TODO: Supplier part
},
{
accessor: 'MPN',
title: t`Manufacturer Part`,
sortable: true
},
{
accessor: 'purchase_price',
title: t`Unit Price`,
sortable: true,
switchable: true,
render: (record: any) =>
@ -242,10 +244,6 @@ function stockItemTableColumns(): TableColumn[] {
currency: record.purchase_price_currency
})
},
{
accessor: 'packaging',
sortable: true
},
{
accessor: 'stock_value',
title: t`Stock Value`,
@ -264,9 +262,24 @@ function stockItemTableColumns(): TableColumn[] {
}
},
{
accessor: 'notes',
sortable: false
}
accessor: 'packaging',
sortable: true
},
DateColumn({
title: t`Expiry Date`,
accessor: 'expiry_date',
hidden: !useGlobalSettingsState.getState().isSet('STOCK_ENABLE_EXPIRY')
}),
DateColumn({
title: t`Last Updated`,
accessor: 'updated'
}),
DateColumn({
accessor: 'stocktake_date',
title: t`Stocktake Date`,
sortable: true
})
];
}