Skip to content

Commit

Permalink
Merge pull request #13347 from snipe/fixes/custom_report_error_on_bad…
Browse files Browse the repository at this point in the history
…_model

Possible alternative to fixing #13296 - custom report failing when th…
  • Loading branch information
snipe authored Jul 21, 2023
2 parents 4fe6632 + 540b09c commit 39ea15a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public function validationRules()
*/
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');
}


Expand Down

0 comments on commit 39ea15a

Please sign in to comment.