Fixed depreciation display on asset view
This commit is contained in:
@@ -141,7 +141,7 @@ class Asset extends Elegant {
|
||||
|
||||
public function depreciation()
|
||||
{
|
||||
return $this->belongsTo('Depreciation','id');
|
||||
return $this->model->belongsTo('Depreciation','depreciation_id');
|
||||
}
|
||||
|
||||
public function model()
|
||||
|
||||
@@ -71,7 +71,6 @@ View Asset {{ $asset->asset_tag }} ::
|
||||
{{ $asset->months_until_depreciated()->y }} years</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user