diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index c99b9be18..eee044630 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -133,7 +133,7 @@ class Transaction extends Model public function parent() { - return $this->belongsTo('App\Models\Banking\Transaction', 'parent_id'); + return $this->belongsTo('App\Models\Banking\Transaction', 'parent_id')->isRecurring(); } public function recurring() diff --git a/app/Models/Common/Recurring.php b/app/Models/Common/Recurring.php index 01b981afa..5d292bcbb 100644 --- a/app/Models/Common/Recurring.php +++ b/app/Models/Common/Recurring.php @@ -51,7 +51,7 @@ class Recurring extends Model */ public function recurable() { - return $this->morphTo(); + return $this->morphTo()->isRecurring(); } public function scopeActive(Builder $query): Builder diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index d1642d1e3..d271b53f0 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -136,7 +136,7 @@ class Document extends Model public function parent() { - return $this->belongsTo('App\Models\Document\Document', 'parent_id'); + return $this->belongsTo('App\Models\Document\Document', 'parent_id')->isRecurring(); } public function payments()