mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-09-03 20:52:58 -05:00
Some code cleanup [skip ci]
This commit is contained in:
@@ -54,7 +54,7 @@ class AccountReportHelper implements AccountReportHelperInterface
|
||||
->whereNull('transactions.deleted_at')
|
||||
->where('transaction_journals.date', '<=', $yesterday->format('Y-m-d'))
|
||||
->groupBy('accounts.id')
|
||||
->get(['accounts.id', DB::Raw('SUM(`transactions`.`amount`) as `balance`')]);
|
||||
->get(['accounts.id', DB::raw('SUM(`transactions`.`amount`) as `balance`')]);
|
||||
|
||||
// and end:
|
||||
$endSet = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
|
||||
@@ -64,7 +64,7 @@ class AccountReportHelper implements AccountReportHelperInterface
|
||||
->whereNull('transactions.deleted_at')
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
->groupBy('accounts.id')
|
||||
->get(['accounts.id', DB::Raw('SUM(`transactions`.`amount`) as `balance`')]);
|
||||
->get(['accounts.id', DB::raw('SUM(`transactions`.`amount`) as `balance`')]);
|
||||
|
||||
|
||||
$accounts->each(
|
||||
|
||||
@@ -50,8 +50,8 @@ class ReportQuery implements ReportQueryInterface
|
||||
->groupBy('dateFormatted')
|
||||
->get(
|
||||
[
|
||||
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'),
|
||||
DB::Raw('SUM(`t_to`.`amount`) AS `sum`'),
|
||||
DB::raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'),
|
||||
DB::raw('SUM(`t_to`.`amount`) AS `sum`'),
|
||||
]
|
||||
);
|
||||
$array = [];
|
||||
@@ -164,8 +164,8 @@ class ReportQuery implements ReportQueryInterface
|
||||
->groupBy('dateFormatted')
|
||||
->get(
|
||||
[
|
||||
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'),
|
||||
DB::Raw('SUM(`t_from`.`amount`) AS `sum`'),
|
||||
DB::raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'),
|
||||
DB::raw('SUM(`t_from`.`amount`) AS `sum`'),
|
||||
]
|
||||
);
|
||||
$array = [];
|
||||
|
||||
Reference in New Issue
Block a user