Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Better titles.
James Cole2e444da2a347
diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.phpindex 9a28791ab2..2bfd7f941b 100644--- a/app/Http/Controllers/Popup/ReportController.php+++ b/app/Http/Controllers/Popup/ReportController.php@@ -24,6 +24,7 @@ use FireflyIII\Support\Binder\AccountList;use Illuminate\Http\Request;use InvalidArgumentException;use Response;+use View;/*** Class ReportController@@ -42,6 +43,10 @@ class ReportController extends Controller{$attributes = $request->get('attributes');$attributes = $this->parseAttributes($attributes);++ View::share('start', $attributes['startDate']);+ View::share('end', $attributes['endDate']);+switch ($attributes['location']) {default:throw new FireflyException('Firefly cannot handle "' . e($attributes['location']) . '" ');@@ -94,11 +99,13 @@ class ReportController extends Controller$journals = $budgetRepository->expensesSplit($budget, $account, $attributes['startDate'], $attributes['endDate']);break;case ($role === BalanceLine::ROLE_DEFAULTROLE && is_null($budget->id)):- $journals = $budgetRepository->getAllWithoutBudget($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);+ $budget->name = strval(trans('firefly.no_budget'));+ $journals = $budgetRepository->getAllWithoutBudget($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);break;case ($role === BalanceLine::ROLE_DIFFROLE):// journals no budget, not corrected by a tag.$journals = $budgetRepository->getAllWithoutBudget($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);+ $budget->name = strval(trans('firefly.leftUnbalanced'));$journals = $journals->filter(function (TransactionJournal $journal) {$tags = $journal->tags()->where('tagMode', 'balancingAct')->count();@@ -111,7 +118,7 @@ class ReportController extends Controllercase ($role === BalanceLine::ROLE_TAGROLE):throw new FireflyException('Firefly cannot handle this type of info-button (BalanceLine::TagRole)');}- $view = view('popup.report.balance-amount', compact('journals'))->render();+ $view = view('popup.report.balance-amount', compact('journals', 'budget', 'account'))->render();return $view;}@@ -139,7 +146,7 @@ class ReportController extends Controller$journals = $repository->getExpenses($budget, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);}- $view = view('popup.report.budget-spent-amount', compact('journals'))->render();+ $view = view('popup.report.budget-spent-amount', compact('journals', 'budget'))->render();return $view;}@@ -158,7 +165,7 @@ class ReportController extends Controller$repository = app('FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface');$category = $repository->find(intval($attributes['categoryId']));$journals = $repository->getJournalsForAccountsInRange($category, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);- $view = view('popup.report.category-entry', compact('journals'))->render();+ $view = view('popup.report.category-entry', compact('journals', 'category'))->render();return $view;}@@ -177,7 +184,7 @@ class ReportController extends Controller$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');$account = $repository->find(intval($attributes['accountId']));$journals = $repository->getExpensesByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);- $view = view('popup.report.expense-entry', compact('journals'))->render();+ $view = view('popup.report.expense-entry', compact('journals', 'account'))->render();return $view;}@@ -196,7 +203,8 @@ class ReportController extends Controller$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');$account = $repository->find(intval($attributes['accountId']));$journals = $repository->getIncomeByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);- $view = view('popup.report.income-entry', compact('journals'))->render();+ $view = view('popup.report.income-entry', compact('journals', 'account'))->render();+return $view;}diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex 696c89b530..17600f2e8a 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -659,6 +659,11 @@ return ['report_preset_ranges' => 'Pre-set ranges','shared' => 'Shared','fiscal_year' => 'Fiscal year',+ 'income_entry' => 'Income from account ":name" between :start and :end',+ 'expense_entry' => 'Expenses to account ":name" between :start and :end',+ 'category_entry' => 'Expenses in category ":name" between :start and :end',+ 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end',+ 'balance_amount' => 'Expenses in budget ":budget" paid from account ":account" between :start and :end',// charts:'dayOfMonth' => 'Day of the month',diff --git a/resources/views/popup/report/balance-amount.twig b/resources/views/popup/report/balance-amount.twigindex ad6c20490a..179726fc51 100644--- a/resources/views/popup/report/balance-amount.twig+++ b/resources/views/popup/report/balance-amount.twig@@ -3,7 +3,9 @@<div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">×</span></button>- <h4 class="modal-title" id="balanceAmountTitle">{{ 'balance_amount'|_ }}</h4>+ <h4 class="modal-title" id="balanceAmountTitle">{{ trans('firefly.balance_amount',+ {budget: budget.name, account: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}+ ) }}</h4></div><div class="modal-body">{% set hideSource = true %}diff --git a/resources/views/popup/report/budget-spent-amount.twig b/resources/views/popup/report/budget-spent-amount.twigindex 792e28416a..c319834045 100644--- a/resources/views/popup/report/budget-spent-amount.twig+++ b/resources/views/popup/report/budget-spent-amount.twig@@ -3,7 +3,9 @@<div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">×</span></button>- <h4 class="modal-title" id="budgetSpentAmountLabel">{{ 'budget_spent_amount'|_ }}</h4>+ <h4 class="modal-title" id="budgetSpentAmountLabel">+ {{ trans('firefly.budget_spent_amount', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat), budget: budget.name})}}+ </h4></div><div class="modal-body">{% set hideBudget = true %}diff --git a/resources/views/popup/report/category-entry.twig b/resources/views/popup/report/category-entry.twigindex 5062d9df89..b60c3f57c7 100644--- a/resources/views/popup/report/category-entry.twig+++ b/resources/views/popup/report/category-entry.twig@@ -3,7 +3,7 @@<div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">×</span></button>- <h4 class="modal-title" id="expenseEntryTitle">{{ 'category_entry'|_ }}</h4>+ <h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4></div><div class="modal-body">{% set hideCategory = true %}diff --git a/resources/views/popup/report/expense-entry.twig b/resources/views/popup/report/expense-entry.twigindex 26c0c140aa..a1a3ea2f40 100644--- a/resources/views/popup/report/expense-entry.twig+++ b/resources/views/popup/report/expense-entry.twig@@ -3,7 +3,7 @@<div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">×</span></button>- <h4 class="modal-title" id="expenseEntryTitle">{{ 'expense_entry'|_ }}</h4>+ <h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4></div><div class="modal-body">{% set hideDestination = true %}diff --git a/resources/views/popup/report/income-entry.twig b/resources/views/popup/report/income-entry.twigindex 9e401f6fe2..504960ea69 100644--- a/resources/views/popup/report/income-entry.twig+++ b/resources/views/popup/report/income-entry.twig@@ -3,7 +3,7 @@<div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">×</span></button>- <h4 class="modal-title" id="incomeEntryTitle">{{ 'income_entry'|_ }}</h4>+ <h4 class="modal-title" id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4></div><div class="modal-body">{% set hideBudget = true %}