2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-30 18:50:53 +00:00

Fix bug in recent part scheduling table (#3566)

* Gotta make a variable to reference a variable

* Fix scaling issues

* Hey, it's only a suggestion

* Fix quantity display in build order table

* Logic fix for destroying / refreshing chart

* Better handling of edge cases

* Fix issue with "undefined" labels

* Speculative should be a question mark
This commit is contained in:
Oliver
2022-08-18 15:12:59 +10:00
committed by GitHub
parent b70a0164ae
commit 7384a85bdb
3 changed files with 63 additions and 15 deletions

View File

@ -1831,6 +1831,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
var available_stock = availableQuantity(row);
var required = requiredQuantity(row);
var allocated = allocatedQuantity(row);
var text = '';
@ -1838,7 +1839,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
text += `${available_stock}`;
}
if (available_stock < required) {
if (available_stock < (required - allocated)) {
text += `<span class='fas fa-times-circle icon-red float-right' title='{% trans "Insufficient stock available" %}'></span>`;
} else {
text += `<span class='fas fa-check-circle icon-green float-right' title='{% trans "Sufficient stock available" %}'></span>`;