mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some cleaning up courtesy of PHPStorm.
This commit is contained in:
@@ -61,7 +61,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
->get(
|
||||
[
|
||||
'transaction_journals.bill_id',
|
||||
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')
|
||||
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -476,7 +476,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
->get(
|
||||
[
|
||||
'bills.*',
|
||||
DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`')
|
||||
DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`'),
|
||||
]
|
||||
)->sortBy('name');
|
||||
|
||||
|
@@ -89,7 +89,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
->get(
|
||||
[
|
||||
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'),
|
||||
DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`')
|
||||
DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -316,7 +316,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
[
|
||||
'budgets.*',
|
||||
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'),
|
||||
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`')
|
||||
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -559,7 +559,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
[
|
||||
'budgets.*',
|
||||
DB::Raw('DATE_FORMAT(`limit_repetitions`.`startdate`,"%Y") as `dateFormatted`'),
|
||||
DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`')
|
||||
DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -603,7 +603,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
[
|
||||
'budgets.*',
|
||||
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y") AS `dateFormatted`'),
|
||||
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`')
|
||||
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -720,7 +720,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
->get(
|
||||
[
|
||||
't_from.account_id', 'budget_transaction_journal.budget_id',
|
||||
DB::Raw('SUM(`t_from`.`amount`) AS `spent`')
|
||||
DB::Raw('SUM(`t_from`.`amount`) AS `spent`'),
|
||||
]
|
||||
);
|
||||
|
||||
|
@@ -196,14 +196,14 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
[
|
||||
'account_id' => $fromAccount->id,
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'amount' => $data['amount'] * -1
|
||||
'amount' => $data['amount'] * -1,
|
||||
]
|
||||
);
|
||||
Transaction::create( // second transaction.
|
||||
[
|
||||
'account_id' => $toAccount->id,
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'amount' => $data['amount']
|
||||
'amount' => $data['amount'],
|
||||
]
|
||||
);
|
||||
$journal->completed = 1;
|
||||
|
@@ -131,7 +131,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
->get(
|
||||
[
|
||||
't_to.account_id',
|
||||
DB::Raw('SUM(`t_to`.`amount`) as `sum`')
|
||||
DB::Raw('SUM(`t_to`.`amount`) as `sum`'),
|
||||
]
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user