소스 검색

Fix bug in ingredient details

Lee Morgan 5 년 전
부모
커밋
bdc4d3a6b9
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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);