Merge pull request #2227 from cuneytsenturk/transfer-enhancement

Transaction not edit, duplicate, delete etc button for Transferred
This commit is contained in:
Cüneyt Şentürk
2021-08-18 15:19:48 +03:00
committed by GitHub
2 changed files with 24 additions and 0 deletions

View File

@ -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.
*