mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add quantity selector to 'move items' modal form
This commit is contained in:
parent
9ba91a9d80
commit
99c0921113
@ -267,21 +267,38 @@ function moveStockItems(items, options) {
|
||||
|
||||
html += "<p class='warning-msg' id='note-warning'><i>Note field must be filled</i></p>";
|
||||
|
||||
html += "<hr>The following stock items will be moved:<br><ul class='list-group'>\n";
|
||||
html += "<hr>The following stock items will be moved:<hr>";
|
||||
|
||||
html += `
|
||||
<table class='table table-striped table-condensed'>
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Location</th>
|
||||
<th>Available</th>
|
||||
<th>Moving</th>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
for (i = 0; i < items.length; i++) {
|
||||
parts.push(items[i].pk);
|
||||
|
||||
html += "<li class='list-group-item'>" + items[i].quantity + " × " + items[i].part.name;
|
||||
var item = items[i];
|
||||
|
||||
if (items[i].location) {
|
||||
html += " (" + items[i].location.name + ")";
|
||||
html += "<tr>";
|
||||
|
||||
html += "<td>" + item.part.name + "</td>";
|
||||
html += "<td>" + item.location.pathstring + "</td>";
|
||||
html += "<td>" + item.quantity + "</td>";
|
||||
|
||||
html += "<td>";
|
||||
html += "<input class='form-control' min='0' max='" + item.quantity + "'";
|
||||
html += " value='" + item.quantity + "'";
|
||||
html += "type='number' id='q-" + item.pk + "'/></td>";
|
||||
|
||||
html += "</tr>";
|
||||
}
|
||||
|
||||
html += "</li>\n";
|
||||
}
|
||||
|
||||
html += "</ul>\n";
|
||||
html += "</table>";
|
||||
|
||||
openModal({
|
||||
modal: modal,
|
||||
|
Loading…
Reference in New Issue
Block a user