mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 20:54:04 -06:00
Fixed a bug where the bill chart and boxes would inaccurately reflect the amount of bills yet to pay.
This commit is contained in:
parent
d3f642551d
commit
2ef7a01945
@ -302,7 +302,7 @@ class GoogleChartController extends Controller
|
||||
/** @var Bill $entry */
|
||||
foreach ($unpaid as $entry) {
|
||||
$unpaidDescriptions[] = $entry[0]->name . ' (' . $entry[1]->format('jS M Y') . ')';
|
||||
$unpaidAmount += ($entry[0]->amount_max + $entry[0]->amount_min / 2);
|
||||
$unpaidAmount += ($entry[0]->amount_max + $entry[0]->amount_min) / 2;
|
||||
}
|
||||
|
||||
$chart->addRow('Unpaid: ' . join(', ', $unpaidDescriptions), $unpaidAmount);
|
||||
|
@ -70,6 +70,7 @@ class JsonController extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($bill, $range, $ranges);
|
||||
|
||||
$creditCards = $accountRepository->getCreditCards();
|
||||
foreach ($creditCards as $creditCard) {
|
||||
@ -86,8 +87,7 @@ class JsonController extends Controller
|
||||
// loop unpaid:
|
||||
/** @var Bill $entry */
|
||||
foreach ($unpaid as $entry) {
|
||||
$unpaidDescriptions[] = $entry[0]->name . ' (' . $entry[1]->format('jS M Y') . ')';
|
||||
$amount += ($entry[0]->amount_max + $entry[0]->amount_min / 2);
|
||||
$amount += ($entry[0]->amount_max + $entry[0]->amount_min) / 2;
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user