From a55f6a1c7b91abf64deb46e419a1c73dc0b32e4c Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 6 May 2018 22:01:24 +1000 Subject: [PATCH] Improved stock movement modal - Show which parts will be moved (and where they currently are) --- InvenTree/static/script/inventree/stock.js | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/static/script/inventree/stock.js index 77341fe363..5a5a628b9c 100644 --- a/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/static/script/inventree/stock.js @@ -42,21 +42,35 @@ function moveStock(rows, options) { // Extact part row info var parts = []; - for (i = 0; i < rows.length; i++) { - parts.push(rows[i].pk); - } + var html = "Select new location:
\n"; - var form = ""; for (i = 0; i < response.length; i++) { var loc = response[i]; - form += makeOption(loc.pk, loc.name + ' - ' + loc.description + ''); + html += makeOption(loc.pk, loc.name + ' - ' + loc.description + ''); } - form += " + html += "

"; - modalSetContent(modal, form); + html += "The following stock items will be moved:
\n"; + + modalSetContent(modal, html); attachSelect(modal); $(modal).on('click', '#modal-form-submit', function() {