Tag report.

This commit is contained in:
James Cole
2016-03-01 21:31:25 +01:00
parent 701d7baca8
commit 01be5e3e23
8 changed files with 107 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
/** @var string */
protected $dateTimeFormat;
/** @var string */
protected $monthAndDayFormat;
/** @var string */
@@ -43,6 +45,7 @@ class Controller extends BaseController
$lang = $pref->data;
$this->monthFormat = (string)trans('config.month');
$this->monthAndDayFormat = (string)trans('config.month_and_day');
$this->dateTimeFormat = (string)trans('config.date_time');
App::setLocale($lang);
Carbon::setLocale(substr($lang, 0, 2));
@@ -61,6 +64,7 @@ class Controller extends BaseController
];
View::share('monthFormat', $this->monthFormat);
View::share('monthAndDayFormat', $this->monthAndDayFormat);
View::share('dateTimeFormat', $this->dateTimeFormat);
View::share('language', $lang);
View::share('localeconv', $localeconv);
}

View File

@@ -161,6 +161,7 @@ class ReportController extends Controller
$categories = $this->helper->getCategoryReport($start, $end, $accounts);
$balance = $this->balanceHelper->getBalanceReport($start, $end, $accounts);
$bills = $this->helper->getBillReport($start, $end, $accounts);
$tags = $this->helper->tagReport($start, $end, $accounts);
// and some id's, joined:
$accountIds = join(',', $accounts->pluck('id')->toArray());
@@ -170,7 +171,7 @@ class ReportController extends Controller
'reports.default.month',
compact(
'start', 'end', 'reportType',
'accountReport',
'accountReport', 'tags',
'incomes', 'incomeTopLength',
'expenses', 'expenseTopLength',
'budgets', 'balance',
@@ -234,6 +235,7 @@ class ReportController extends Controller
$accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts);
$incomes = $this->helper->getIncomeReport($start, $end, $accounts);
$expenses = $this->helper->getExpenseReport($start, $end, $accounts);
$tags = $this->helper->tagReport($start, $end, $accounts);
Session::flash('gaEventCategory', 'report');
Session::flash('gaEventAction', 'year');
@@ -251,7 +253,7 @@ class ReportController extends Controller
'reports.default.year',
compact(
'start', 'accountReport', 'incomes', 'reportType', 'accountIds', 'end',
'expenses', 'incomeTopLength', 'expenseTopLength'
'expenses', 'incomeTopLength', 'expenseTopLength','tags'
)
);
}