Selaa lähdekoodia

Fix bug in ingredient details

Lee Morgan 5 vuotta sitten
vanhempi
sitoutus
bdc4d3a6b9
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      views/dashboardPage/bundle.js
  2. 1 1
      views/dashboardPage/js/ingredientDetails.js

+ 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);