Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
This should clean up the monthly report a bit. See issue #159
James Cole15104de84c31
diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.phpindex ac34fef3ce..3191a36665 100644--- a/app/Helpers/Report/BudgetReportHelper.php+++ b/app/Helpers/Report/BudgetReportHelper.php@@ -52,12 +52,15 @@ class BudgetReportHelper implements BudgetReportHelperInterface// no repetition(s) for this budget:if ($repetitions->count() == 0) {- $spent = array_sum($totalSpent);- $budgetLine = new BudgetLine;- $budgetLine->setBudget($budget);- $budgetLine->setOverspent($spent);- $object->addOverspent($spent);- $object->addBudgetLine($budgetLine);++ $spent = array_sum($totalSpent);+ if ($spent > 0) {+ $budgetLine = new BudgetLine;+ $budgetLine->setBudget($budget);+ $budgetLine->setOverspent($spent);+ $object->addOverspent($spent);+ $object->addBudgetLine($budgetLine);+ }continue;}