mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -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 */
|
/** @var Bill $entry */
|
||||||
foreach ($unpaid as $entry) {
|
foreach ($unpaid as $entry) {
|
||||||
$unpaidDescriptions[] = $entry[0]->name . ' (' . $entry[1]->format('jS M Y') . ')';
|
$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);
|
$chart->addRow('Unpaid: ' . join(', ', $unpaidDescriptions), $unpaidAmount);
|
||||||
|
@ -70,6 +70,7 @@ class JsonController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unset($bill, $range, $ranges);
|
||||||
|
|
||||||
$creditCards = $accountRepository->getCreditCards();
|
$creditCards = $accountRepository->getCreditCards();
|
||||||
foreach ($creditCards as $creditCard) {
|
foreach ($creditCards as $creditCard) {
|
||||||
@ -86,8 +87,7 @@ class JsonController extends Controller
|
|||||||
// loop unpaid:
|
// loop unpaid:
|
||||||
/** @var Bill $entry */
|
/** @var Bill $entry */
|
||||||
foreach ($unpaid as $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;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user