mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Sorter fixes
This commit is contained in:
parent
4167e1fdb3
commit
b5e1d3f87a
@ -536,8 +536,16 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
|||||||
var aA = sumAllocations(rowA);
|
var aA = sumAllocations(rowA);
|
||||||
var aB = sumAllocations(rowB);
|
var aB = sumAllocations(rowB);
|
||||||
|
|
||||||
var qA = rowA.quantity * output.quantity;
|
var qA = rowA.quantity;
|
||||||
var qB = rowB.quantity * output.quantity;
|
var qB = rowB.quantity;
|
||||||
|
|
||||||
|
if (output) {
|
||||||
|
qA *= output.quantity;
|
||||||
|
qB *= output.quantity;
|
||||||
|
} else {
|
||||||
|
qA *= buildInfo.quantity;
|
||||||
|
qB *= buildInfo.quantity;
|
||||||
|
}
|
||||||
|
|
||||||
if (aA == 0 && aB == 0) {
|
if (aA == 0 && aB == 0) {
|
||||||
return (qA > qB) ? 1 : -1;
|
return (qA > qB) ? 1 : -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user