mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
@@ -30,25 +30,25 @@ class ComponentRepository
|
||||
// always ignore transfers between accounts!
|
||||
$sum
|
||||
= $object->transactionjournals()
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->before($end)->after($start)->get(['transaction_journals.*'])->sum('amount');
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->before($end)->after($start)->get(['transaction_journals.*'])->sum('amount');
|
||||
|
||||
} else {
|
||||
// do something else, SEE budgets.
|
||||
// get all journals in this month where the asset account is NOT shared.
|
||||
$sum = $object->transactionjournals()
|
||||
->before($end)
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||
->leftJoin(
|
||||
'account_meta', function (JoinClause $join) {
|
||||
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->where('account_meta.data', '!=', '"sharedAsset"')
|
||||
->get(['transaction_journals.*'])->sum('amount');
|
||||
->before($end)
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||
->leftJoin(
|
||||
'account_meta', function (JoinClause $join) {
|
||||
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->where('account_meta.data', '!=', '"sharedAsset"')
|
||||
->get(['transaction_journals.*'])->sum('amount');
|
||||
}
|
||||
|
||||
return $sum;
|
||||
|
Reference in New Issue
Block a user