mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 05:25:42 +00:00
Display expiry status on StockItem page
- Also adds ability to filter Stock table by expired status
This commit is contained in:
@ -532,6 +532,10 @@ function loadStockTable(table, options) {
|
||||
html += makeIconBadge('fa-user', '{% trans "Stock item assigned to customer" %}');
|
||||
}
|
||||
|
||||
if (row.expired) {
|
||||
html += makeIconBadge('fa-stopwatch icon-red', '{% trans "Stock item has expired" %}');
|
||||
}
|
||||
|
||||
if (row.allocated) {
|
||||
html += makeIconBadge('fa-bookmark', '{% trans "Stock item has been allocated" %}');
|
||||
}
|
||||
|
@ -106,6 +106,11 @@ function getAvailableTableFilters(tableKey) {
|
||||
title: '{% trans "Depleted" %}',
|
||||
description: '{% trans "Show stock items which are depleted" %}',
|
||||
},
|
||||
expired: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Expired" %}',
|
||||
description: '{% trans "Show stock items which have expired" %}',
|
||||
},
|
||||
in_stock: {
|
||||
type: 'bool',
|
||||
title: '{% trans "In Stock" %}',
|
||||
|
Reference in New Issue
Block a user