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:
@ -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
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user