소스 검색

Analytics categories display correct data, but only on page reload.

Lee Morgan 5 년 전
부모
커밋
672eac50e7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      views/dashboardPage/js/classes/Transaction.js

+ 1 - 1
views/dashboardPage/js/classes/Transaction.js

@@ -46,7 +46,7 @@ class Transaction{
     getIngredientQuantity(ingredient){
     getIngredientQuantity(ingredient){
         let total = 0;
         let total = 0;
         for(let i = 0; i < this._recipes.length; i++){
         for(let i = 0; i < this._recipes.length; i++){
-            total += this._recipes[i].recipe.getIngredientTotal(ingredient.id);
+            total += this._recipes[i].recipe.getIngredientTotal(ingredient.id) * this._recipes[i].quantity;
         }
         }
 
 
         return total;
         return total;