@@ -1264,24 +1264,24 @@ |
||
1264 | 1264 | |
1265 | 1265 | // Loop through each sum and see if arguments and conditions are true |
1266 | 1266 | foreach ($sumArgs as $index => $value) { |
1267 | - $valid = true; |
|
1267 | + $valid = true; |
|
1268 | 1268 | |
1269 | - foreach ($conditions as $cidx => $condition) { |
|
1270 | - $arg = $aArgsArray[$cidx][$index]; |
|
1269 | + foreach ($conditions as $cidx => $condition) { |
|
1270 | + $arg = $aArgsArray[$cidx][$index]; |
|
1271 | 1271 | |
1272 | - // Loop through arguments |
|
1273 | - if (!is_numeric($arg)) { |
|
1274 | - $arg = Calculation::wrapResult(strtoupper($arg)); |
|
1275 | - } |
|
1276 | - $testCondition = '=' . $arg . $condition; |
|
1277 | - if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { |
|
1278 | - // Is not a value within our criteria |
|
1279 | - $valid = false; |
|
1272 | + // Loop through arguments |
|
1273 | + if (!is_numeric($arg)) { |
|
1274 | + $arg = Calculation::wrapResult(strtoupper($arg)); |
|
1275 | + } |
|
1276 | + $testCondition = '=' . $arg . $condition; |
|
1277 | + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { |
|
1278 | + // Is not a value within our criteria |
|
1279 | + $valid = false; |
|
1280 | 1280 | break; // if false found, don't need to check other conditions |
1281 | - } |
|
1282 | - } |
|
1281 | + } |
|
1282 | + } |
|
1283 | 1283 | |
1284 | - if ($valid) { $returnValue += $value; } |
|
1284 | + if ($valid) { $returnValue += $value; } |
|
1285 | 1285 | } |
1286 | 1286 | |
1287 | 1287 | // Return |
@@ -1277,11 +1277,11 @@ |
||
1277 | 1277 | if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { |
1278 | 1278 | // Is not a value within our criteria |
1279 | 1279 | $valid = false; |
1280 | - break; // if false found, don't need to check other conditions |
|
1280 | + break; // if false found, don't need to check other conditions |
|
1281 | 1281 | } |
1282 | 1282 | } |
1283 | 1283 | |
1284 | - if ($valid) { $returnValue += $value; } |
|
1284 | + if ($valid) { $returnValue += $value; } |
|
1285 | 1285 | } |
1286 | 1286 | |
1287 | 1287 | // Return |