diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index 76d6e846ba..f86822f53c 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -16,8 +16,10 @@
@@ -110,16 +112,29 @@ return false; }); - $("#multi-item-stocktake").click(function() { - var items = selectedStock(); - - countStockItems(items, { + function _stock(action) { + adjustStock({ + action: action, + items: selectedStock(), success: function() { - $("#stock-table").bootstrapTable('refresh'); + $('#stock-table').bootstrapTable('refresh'); } }); + } + $("#multi-item-stocktake").click(function() { + _stock('stocktake'); return false; }); + $("#multi-item-take").click(function() { + _stock('remove'); + return false; + }); + + $("#multi-item-give").click(function() { + _stock('add'); + return false; + }) + {% endblock %} \ No newline at end of file