2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Add "IPN" column to stock list table

This commit is contained in:
Oliver Walters
2020-06-06 08:47:06 +10:00
parent f563ac0dcb
commit 126e42a022
7 changed files with 16 additions and 22 deletions

View File

@ -262,6 +262,7 @@ function loadStockTable(table, options) {
customSort: customGroupSorter,
groupBy: true,
original: original,
showColumns: true,
groupByField: options.groupByField || 'part',
groupByFormatter: function(field, id, data) {
@ -273,6 +274,9 @@ function loadStockTable(table, options) {
return imageHoverIcon(row.part_detail.thumbnail) + name + ' <i>(' + data.length + ' items)</i>';
}
else if (field == 'IPN') {
return row.part_detail.IPN;
}
else if (field == 'part_description') {
return row.part_detail.description;
}
@ -403,6 +407,15 @@ function loadStockTable(table, options) {
field: 'pk',
title: 'ID',
visible: false,
switchable: false,
},
{
field: 'IPN',
title: 'IPN',
sortable: true,
formatter: function(value, row, index, field) {
return row.part_detail.IPN;
},
},
{
field: 'part_name',