mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Add ability to display "out of stock" items against a part
This commit is contained in:
@ -494,10 +494,15 @@ function loadStockTable(table, options) {
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
if (value) {
|
||||
return renderLink(value, '/stock/location/' + row.location + '/');
|
||||
return renderLink(value, `/stock/location/${row.location}/`);
|
||||
}
|
||||
else {
|
||||
return '<i>{% trans "No stock location set" %}</i>';
|
||||
if (row.customer) {
|
||||
var text = "{% trans "Shipped to customer" %}";
|
||||
return renderLink(text, `/company/${row.customer}/assigned-stock/`);
|
||||
} else {
|
||||
return '<i>{% trans "No stock location set" %}</i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -14,6 +14,11 @@ function getAvailableTableFilters(tableKey) {
|
||||
// Filters for the "Stock" table
|
||||
if (tableKey == 'stock') {
|
||||
return {
|
||||
in_stock: {
|
||||
type: 'bool',
|
||||
title: '{% trans "In Stock" %}',
|
||||
description: '{% trans "Show items which are in stock" %}',
|
||||
},
|
||||
cascade: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Include sublocations" %}',
|
||||
|
Reference in New Issue
Block a user