From 1dc7fd1bdf8852fed6d886938f632c8ea69d4798 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 3 Dec 2013 03:15:02 -0500 Subject: [PATCH] Fixed depreciation display on asset view --- app/models/Asset.php | 2 +- app/views/backend/hardware/view.blade.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/Asset.php b/app/models/Asset.php index a750980550..4cb343328f 100644 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -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() diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index 8da1a4ec77..2ae66b2965 100644 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -71,7 +71,6 @@ View Asset {{ $asset->asset_tag }} :: {{ $asset->months_until_depreciated()->y }} years @endif -