Bug fix for javascript

- If location not set for StockItem, display special text
This commit is contained in:
Oliver Walters 2019-04-25 22:34:30 +10:00
parent 053e9c9795
commit 38fa89d1da

View File

@ -65,7 +65,12 @@ function updateStock(items, options={}) {
html += '<tr>'; html += '<tr>';
html += '<td>' + item.part.name + '</td>'; html += '<td>' + item.part.name + '</td>';
html += '<td>' + item.location.name + '</td>';
if (item.location) {
html += '<td>' + item.location.name + '</td>';
} else {
html += '<td><i>No location set</i></td>';
}
html += "<td><input class='form-control' "; html += "<td><input class='form-control' ";
html += "value='" + vCur + "' "; html += "value='" + vCur + "' ";
html += "min='" + vMin + "' "; html += "min='" + vMin + "' ";