diff --git a/app/models/Depreciation.php b/app/models/Depreciation.php index 8413364801..940dd35b5b 100644 --- a/app/models/Depreciation.php +++ b/app/models/Depreciation.php @@ -8,5 +8,9 @@ class Depreciation extends Elegant { 'months' => 'required|min:1|integer', ); + public function has_models() + { + return $this->hasMany('Model', 'depreciation_id')->count(); + } }