Explorar o código

Fix bug in ingredient details

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
bdc4d3a6b9

+ 1 - 1
views/dashboardPage/bundle.js

@@ -1293,7 +1293,7 @@ let ingredientDetails = {
         for(let i = 1; i < 31; i++){
             let endDay = new Date(now.getFullYear(), now.getMonth(), now.getDate() - i)
             let startDay = new Date(now.getFullYear(), now.getMonth(), now.getDate() - i - 1);
-            let indices = controller.transactionIndices(merchant.transactions, startDate, endDay);
+            let indices = controller.transactionIndices(merchant.transactions, startDay, endDay);
 
             if(indices === false){
                 quantities.push(0);

+ 1 - 1
views/dashboardPage/js/ingredientDetails.js

@@ -27,7 +27,7 @@ let ingredientDetails = {
         for(let i = 1; i < 31; i++){
             let endDay = new Date(now.getFullYear(), now.getMonth(), now.getDate() - i)
             let startDay = new Date(now.getFullYear(), now.getMonth(), now.getDate() - i - 1);
-            let indices = controller.transactionIndices(merchant.transactions, startDate, endDay);
+            let indices = controller.transactionIndices(merchant.transactions, startDay, endDay);
 
             if(indices === false){
                 quantities.push(0);