mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 10:51:12 -06:00
Fix multi-year chart. [skip ci]
This commit is contained in:
parent
5ab8cb38d3
commit
042b7a4966
@ -168,7 +168,6 @@ class ReportController extends Controller
|
||||
$currentStart = Navigation::addPeriod($currentStart, '1M', 0);
|
||||
}
|
||||
|
||||
|
||||
if ($start->diffInMonths($end) > 12) {
|
||||
// per year
|
||||
$data = $this->multiYearInOutSummarized($earnedArray, $spentArray, $start, $end);
|
||||
@ -195,7 +194,7 @@ class ReportController extends Controller
|
||||
while ($start < $end) {
|
||||
|
||||
$incomeSum = $this->pluckFromArray($start->year, $earned);
|
||||
$expenseSum = $this->pluckFromArray($start->year, $spent) * -1;
|
||||
$expenseSum = $this->pluckFromArray($start->year, $spent);
|
||||
|
||||
$entries->push([clone $start, $incomeSum, $expenseSum]);
|
||||
$start->addYear();
|
||||
@ -222,7 +221,7 @@ class ReportController extends Controller
|
||||
while ($start < $end) {
|
||||
|
||||
$currentIncome = $this->pluckFromArray($start->year, $earned);
|
||||
$currentExpense = bcmul($this->pluckFromArray($start->year, $spent), '-1');
|
||||
$currentExpense = $this->pluckFromArray($start->year, $spent);
|
||||
$income = bcadd($income, $currentIncome);
|
||||
$expense = bcadd($expense, $currentExpense);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user