From 74fe0ee4e40784770d542e89033fc498847dc603 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 2 Mar 2016 11:58:31 +0100 Subject: [PATCH] Add some todo things, removed "withrelevantdata". This breaks FF --- app/Models/TransactionJournal.php | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index cfdfd21143..91e21d7614 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -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 *