| Line 225... |
Line 225... |
| 225 |
|
225 |
|
| 226 |
for (var i = 0; i < items.length; i++) {
|
226 |
for (var i = 0; i < items.length; i++) {
|
| 227 |
var item = items[i];
|
227 |
var item = items[i];
|
| 228 |
var $row = $('<tr>' +
|
228 |
var $row = $('<tr>' +
|
| 229 |
'<td><input type="text" class="form-control typeaheaditem" autocomplete="off" value="' + item.modelName + '" readonly/></td>' +
|
229 |
'<td><input type="text" class="form-control typeaheaditem" autocomplete="off" value="' + item.modelName + '" readonly/></td>' +
|
| 230 |
'<td><input type="number" class="form-control qty" name="qty" value="' + item.amendedQty + '"/></td>' +
|
230 |
'<td><div class="mv-qty-cell"><input type="number" class="form-control qty" name="qty" value="' + item.amendedQty + '"/><span class="mv-avail-icon" style="display:none;" tabindex="0">i</span></div><div class="mv-qty-warn" style="display:none;"></div></td>' +
|
| 231 |
'<td><input type="number" class="form-control transferPrice" readonly tabindex="-1" value="' + item.transferPrice + '" data-itemid="' + item.itemId + '"/></td>' +
|
231 |
'<td><input type="number" class="form-control transferPrice" readonly tabindex="-1" value="' + item.transferPrice + '" data-itemid="' + item.itemId + '"/></td>' +
|
| 232 |
'<td><input type="number" class="form-control totalValue" tabindex="-1" readonly value="' + item.totalValue + '"/></td>' +
|
232 |
'<td><input type="number" class="form-control totalValue" tabindex="-1" readonly value="' + item.totalValue + '"/></td>' +
|
| 233 |
'<td><input class="form-control btn btn-primary removeInPurchaseOrder" tabindex="-1" type="button" value="Remove"></td>' +
|
233 |
'<td><input class="form-control btn btn-primary removeInPurchaseOrder" tabindex="-1" type="button" value="Remove"></td>' +
|
| 234 |
'</tr>');
|
234 |
'</tr>');
|
| 235 |
$('#purchase-order-table tbody').append($row);
|
235 |
$('#purchase-order-table tbody').append($row);
|
| - |
|
236 |
// A bulk-uploaded row gets the same breakdown as one picked by hand; absent for outside vendors,
|
| - |
|
237 |
// in which case this leaves the row alone.
|
| - |
|
238 |
renderMovementAvailability($row, item.availability);
|
| 236 |
purchaseItemIds.push(item.itemId);
|
239 |
purchaseItemIds.push(item.itemId);
|
| 237 |
}
|
240 |
}
|
| 238 |
updateTotalValue();
|
241 |
updateTotalValue();
|
| 239 |
alert("Uploaded " + items.length + " items successfully");
|
242 |
alert("Uploaded " + items.length + " items successfully");
|
| 240 |
},
|
243 |
},
|