James Cole
2022-07-23 16:47:05 +02:00
parent 7f694ede98
commit e8ec13ca5f
2 changed files with 2 additions and 2 deletions

View File

@@ -438,7 +438,7 @@ class BillRepository implements BillRepositoryInterface
//Log::debug(sprintf('Dates = %d, journalCount = %d, total = %d', $dates->count(), $count, $total));
if ($total > 0) {
$average = bcdiv(bcadd($bill->amount_max, $bill->amount_min), '2');
$average = bcdiv(bcadd((string) $bill->amount_max, (string) $bill->amount_min), '2');
$multi = bcmul($average, (string) $total);
$return[$currencyId] = $return[$currencyId] ?? '0';
$return[$currencyId] = bcadd($return[$currencyId], $multi);