Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Include budgeted info as well. [skip ci]
James Colee1b6df6fb134
diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex 4c4bee7d87..7e52555928 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -190,7 +190,7 @@ class BudgetController extends Controllerif ($reps->count() === 0) {$row = $this->spentInPeriodSingle($repository, $budget, $start, $end);- if (bccomp($row['spent'], '0') !== 0 && bccomp($row['repetition_left'], '0') !== 0) {+ if (bccomp($row['spent'], '0') !== 0 || bccomp($row['repetition_left'], '0') !== 0) {$chartData[0]['entries'][$row['name']] = bcmul($row['spent'], '-1');$chartData[1]['entries'][$row['name']] = $row['repetition_left'];$chartData[2]['entries'][$row['name']] = bcmul($row['repetition_overspent'], '-1');@@ -199,7 +199,7 @@ class BudgetController extends Controller}$rows = $this->spentInPeriodMulti($repository, $budget, $reps);foreach ($rows as $row) {- if (bccomp($row['spent'], '0') !== 0 && bccomp($row['repetition_left'], '0') !== 0) {+ if (bccomp($row['spent'], '0') !== 0 || bccomp($row['repetition_left'], '0') !== 0) {$chartData[0]['entries'][$row['name']] = bcmul($row['spent'], '-1');$chartData[1]['entries'][$row['name']] = $row['repetition_left'];$chartData[2]['entries'][$row['name']] = bcmul($row['repetition_overspent'], '-1');@@ -210,7 +210,7 @@ class BudgetController extends Controller}// for no budget:$row = $this->spentInPeriodWithout($start, $end);- if (bccomp($row['spent'], '0') !== 0 && bccomp($row['repetition_left'], '0') !== 0) {+ if (bccomp($row['spent'], '0') !== 0 || bccomp($row['repetition_left'], '0') !== 0) {$chartData[0]['entries'][$row['name']] = bcmul($row['spent'], '-1');$chartData[1]['entries'][$row['name']] = $row['repetition_left'];$chartData[2]['entries'][$row['name']] = bcmul($row['repetition_overspent'], '-1');