mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Fix #98
This commit is contained in:
@@ -809,10 +809,12 @@ function sum($first, $second = null, $decimals = null)
|
||||
$bcadd = function_exists('bcadd');
|
||||
|
||||
foreach ($array as $value) {
|
||||
$value = round($value, $decimals);
|
||||
|
||||
if ($bcadd) {
|
||||
$result = bcadd($result, $value, $decimals);
|
||||
} else {
|
||||
$result = round($result, $decimals) + round($value, $decimals);
|
||||
$result += $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user