Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2023-07-24 13:27:35 +01:00
commit ff3bdebb9a

View file

@ -390,7 +390,7 @@ class Asset extends Depreciable
*/
public function depreciation()
{
return $this->model->belongsTo(\App\Models\Depreciation::class, 'depreciation_id');
return $this->hasOneThrough(\App\Models\Depreciation::class,\App\Models\AssetModel::class,'id','id','model_id','depreciation_id');
}