mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-14 18:40:36 +01:00
Fix #98
This commit is contained in:
parent
a39b44899a
commit
7763dfaa82
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user