mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Add "substitutes" column to BOM table
This commit is contained in:
@ -300,6 +300,20 @@ function loadBomTable(table, options) {
|
|||||||
return renderLink(text, url);
|
return renderLink(text, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cols.push({
|
||||||
|
field: 'substitutes',
|
||||||
|
title: '{% trans "Substitutes" %}',
|
||||||
|
searchable: false,
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row) {
|
||||||
|
if (row.substitutes) {
|
||||||
|
return row.substitutes.length;
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (show_pricing) {
|
if (show_pricing) {
|
||||||
cols.push({
|
cols.push({
|
||||||
|
Reference in New Issue
Block a user