mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-15 19:22:08 -06:00
Add some todo things, removed "withrelevantdata". This breaks FF
This commit is contained in:
parent
e8880232b3
commit
74fe0ee4e4
@ -3,7 +3,6 @@
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Crypt;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@ -131,6 +130,7 @@ class TransactionJournal extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO zo even aanpassen naar nieuwe veldnaam.
|
||||
* @return bool
|
||||
*/
|
||||
public function isDeposit()
|
||||
@ -143,6 +143,8 @@ class TransactionJournal extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO zo even aanpassen naar nieuwe veldnaam.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isOpeningBalance()
|
||||
@ -155,6 +157,8 @@ class TransactionJournal extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO zo even aanpassen naar nieuwe veldnaam.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isTransfer()
|
||||
@ -167,6 +171,8 @@ class TransactionJournal extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO zo even aanpassen naar nieuwe veldnaam.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isWithdrawal()
|
||||
@ -242,22 +248,6 @@ class TransactionJournal extends Model
|
||||
$query->whereIn('transaction_types.type', $types);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Automatically includes the 'with' parameters to get relevant related
|
||||
* objects.
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
*/
|
||||
public function scopeWithRelevantData(EloquentBuilder $query)
|
||||
{
|
||||
$query->with(
|
||||
['transactions' => function (HasMany $q) {
|
||||
$q->orderBy('amount', 'ASC');
|
||||
}, 'transactionType', 'transactionCurrency', 'budgets', 'categories', 'transactions.account.accounttype', 'bill']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user