From 4a5066054b1bb75222c6765675366405a4f70b73 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Jul 2015 22:38:35 -0700 Subject: [PATCH] Display bugfixes for #819 --- app/config/version.php | 4 ++-- app/lang/en/admin/locations/table.php | 1 + app/models/Asset.php | 1 - app/views/backend/hardware/edit.blade.php | 2 +- app/views/backend/hardware/view.blade.php | 7 ++++++- app/views/backend/locations/edit.blade.php | 2 +- app/views/backend/reports/depreciation.blade.php | 11 +++++------ 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index e7936dd2e097..1968d859ac08 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v1.2.8-143', - 'hash_version' => 'v1.2.8-143-g1edce0a', + 'app_version' => 'v1.2.8-149', + 'hash_version' => 'v1.2.8-149-g74429d9', ); \ No newline at end of file diff --git a/app/lang/en/admin/locations/table.php b/app/lang/en/admin/locations/table.php index 0a23c0089d37..1752eecc10bc 100755 --- a/app/lang/en/admin/locations/table.php +++ b/app/lang/en/admin/locations/table.php @@ -13,4 +13,5 @@ 'zip' => 'Postal Code', 'locations' => 'Locations', 'parent' => 'Parent', + 'currency' => 'Location Currency', // this is deprecated ); diff --git a/app/models/Asset.php b/app/models/Asset.php index 59b007055b7e..116da4ba13e4 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -62,7 +62,6 @@ public function assetloc() } - /** * Get the asset's location based on default RTD location **/ diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index 94b31675aff2..2627e7013b03 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -133,7 +133,7 @@
- @if ($asset->id) + @if (($asset->id) && ($asset->assetloc)) {{{ $asset->assetloc->currency }}} @else {{{ Setting::first()->default_currency }}} diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index 2dc896ba74f8..179983f81c6f 100755 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -90,7 +90,12 @@ @if ($asset->purchase_cost)
@lang('admin/hardware/form.cost'): - {{{ $asset->assetloc->currency }}} + @if (($asset->id) && ($asset->assetloc)) + {{{ $asset->assetloc->currency }}} + @else + {{{ Setting::first()->default_currency }}} + @endif + {{{ number_format($asset->purchase_cost,2) }}}
@endif diff --git a/app/views/backend/locations/edit.blade.php b/app/views/backend/locations/edit.blade.php index e3827af9783e..77a62d264010 100755 --- a/app/views/backend/locations/edit.blade.php +++ b/app/views/backend/locations/edit.blade.php @@ -61,7 +61,7 @@
diff --git a/app/views/backend/reports/depreciation.blade.php b/app/views/backend/reports/depreciation.blade.php index 24ba4cbd5ba9..5b1dc4914d16 100644 --- a/app/views/backend/reports/depreciation.blade.php +++ b/app/views/backend/reports/depreciation.blade.php @@ -71,12 +71,11 @@ @endif - @if (isset($asset->assigned_to)) - @if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {{{ Location::find($asset->assigneduser->location_id)->city }}} - , - {{{ Location::find($asset->assigneduser->location_id)->state }}} - @endif - @endif + @if ($asset->assetloc) + {{{ $asset->assetloc->name }}} + @elseif ($asset->defaultloc) + {{{ $asset->defaultloc->name }}} + @endif {{{ $asset->purchase_date }}}