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:
@ -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>`;
|
||||
|
Reference in New Issue
Block a user