diff --git a/InvenTree/static/script/inventree/bom.js b/InvenTree/static/script/inventree/bom.js index 7e8fec103c..3d8db7d7e2 100644 --- a/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/static/script/inventree/bom.js @@ -75,20 +75,15 @@ function loadBomTable(table, options) { field: 'pk', title: 'ID', visible: false, - } + }, + { + checkbox: true, + title: 'Select', + searchable: false, + sortable: false, + }, ]; - if (options.editable) { - cols.push({ - formatter: function(value, row, index, field) { - var bEdit = ""; - var bDelt = ""; - - return "
" + bEdit + bDelt + "
"; - } - }); - } - // Part column cols.push( { @@ -129,8 +124,17 @@ function loadBomTable(table, options) { } ); - // If we are NOT editing, display the available stock - if (!options.editable) { + if (options.editable) { + cols.push({ + formatter: function(value, row, index, field) { + var bEdit = ""; + var bDelt = ""; + + return "
" + bEdit + bDelt + "
"; + } + }); + } + else { cols.push( { field: 'sub_part.available_stock',