2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00

Add "substitutes" column to BOM table

This commit is contained in:
Oliver 2021-10-13 11:58:40 +11:00
parent 324ccd805d
commit f3f41730be

View File

@ -301,6 +301,20 @@ function loadBomTable(table, options) {
} }
}); });
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({
field: 'purchase_price_range', field: 'purchase_price_range',