diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index cb7281a05..f6b1b778b 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -349,6 +349,16 @@ class Transaction extends Model } } + /** + * Check if the record is attached to a transfer. + * + * @return bool + */ + public function getHasTransferRelationAttribute() + { + return (bool) (optional($this->category)->id == optional($this->category)->transfer()); + } + /** * Get the title of type. * diff --git a/resources/views/components/transactions/show/top-buttons.blade.php b/resources/views/components/transactions/show/top-buttons.blade.php index 9481840e9..56a63bf0e 100644 --- a/resources/views/components/transactions/show/top-buttons.blade.php +++ b/resources/views/components/transactions/show/top-buttons.blade.php @@ -8,6 +8,7 @@