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

Loading…
Cancel
Save