From 8b515571cabd36cdabf756674ef19531107da4cf Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 21 Jun 2021 23:33:27 +0200 Subject: [PATCH 1/2] I think a fix for #1663 Closes #1663 --- InvenTree/templates/js/build.js | 1 + InvenTree/templates/js/order.js | 1 + 2 files changed, 2 insertions(+) diff --git a/InvenTree/templates/js/build.js b/InvenTree/templates/js/build.js index e8af981817..31917aab26 100644 --- a/InvenTree/templates/js/build.js +++ b/InvenTree/templates/js/build.js @@ -231,6 +231,7 @@ function loadBuildOrderAllocationTable(table, options={}) { { field: 'quantity', title: '{% trans "Quantity" %}', + sortable: true, } ] }); diff --git a/InvenTree/templates/js/order.js b/InvenTree/templates/js/order.js index 649357b083..0af54fa43c 100644 --- a/InvenTree/templates/js/order.js +++ b/InvenTree/templates/js/order.js @@ -391,6 +391,7 @@ function loadSalesOrderAllocationTable(table, options={}) { { field: 'quantity', title: '{% trans "Quantity" %}', + sortable: true, } ] }); From c8defae5752e182984dd1a0af2f95ec8998929ec Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 22 Jun 2021 00:03:54 +0200 Subject: [PATCH 2/2] fixing allocation sorting --- InvenTree/templates/js/build.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/InvenTree/templates/js/build.js b/InvenTree/templates/js/build.js index 31917aab26..398796773c 100644 --- a/InvenTree/templates/js/build.js +++ b/InvenTree/templates/js/build.js @@ -693,9 +693,6 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { var qA = rowA.quantity; var qB = rowB.quantity; - qA *= output.quantity; - qB *= output.quantity; - // Handle the case where both numerators are zero if ((aA == 0) && (aB == 0)) { return (qA > qB) ? 1 : -1;