mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-29 20:23:51 -06:00
This commit is contained in:
parent
9f0b4564cf
commit
cbcadb6706
@ -169,8 +169,9 @@ class IndexController extends Controller
|
||||
'period' => $range,
|
||||
'per_period' => '0',
|
||||
];
|
||||
|
||||
// only fill in avg when bill is active.
|
||||
if (count($bill['pay_dates']) > 0) {
|
||||
if (null !== $bill['next_expected_match']) {
|
||||
$avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2');
|
||||
$avg = bcmul($avg, (string)count($bill['pay_dates']));
|
||||
$sums[$groupOrder][$currencyId]['avg'] = bcadd($sums[$groupOrder][$currencyId]['avg'], $avg);
|
||||
|
Loading…
Reference in New Issue
Block a user