Neal Wilson 9 years ago
parent
commit
675563b0e6
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      config/Reports/cogr.xml

+ 2
- 2
config/Reports/cogr.xml View File

82
 						weights = sqlToArray(recipeQuantities[i]);
82
 						weights = sqlToArray(recipeQuantities[i]);
83
 						proportions = new Array();
83
 						proportions = new Array();
84
 						quantitySum = weights.reduce(function(p, c) {
84
 						quantitySum = weights.reduce(function(p, c) {
85
-							return p + c;
85
+							return Number(p) + Number(c);
86
 						});
86
 						});
87
 						for(var j = 0; j < weights.length; j++) {
87
 						for(var j = 0; j < weights.length; j++) {
88
 							proportions.push(weights[j]/quantitySum);
88
 							proportions.push(weights[j]/quantitySum);
93
 							query.bind(":id", greens[j]);
93
 							query.bind(":id", greens[j]);
94
 							query.exec();
94
 							query.exec();
95
 							if(query.next()) {
95
 							if(query.next()) {
96
-								partialSum += query.value(0);
96
+								partialSum += Number(query.value(0));
97
 							} else {
97
 							} else {
98
 								print("Error 3");
98
 								print("Error 3");
99
 							}
99
 							}

Loading…
Cancel
Save