From cf2d2ecdfcb64a329749fbee7de06d04bee6c3e3 Mon Sep 17 00:00:00 2001 From: patrict Date: Tue, 28 Aug 2018 21:40:06 +0200 Subject: [PATCH] Depreciation Report: (#6135) * Added monthly depreciation column * Right aligned amount column headings * Added monthly depreciation heading text for en, en-GB & af --- resources/lang/af/admin/hardware/table.php | 3 ++- resources/lang/en-GB/admin/hardware/table.php | 3 ++- resources/lang/en/admin/hardware/table.php | 3 ++- .../views/reports/depreciation.blade.php | 19 ++++++++++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/resources/lang/af/admin/hardware/table.php b/resources/lang/af/admin/hardware/table.php index 8116236d94..ec397ee886 100644 --- a/resources/lang/af/admin/hardware/table.php +++ b/resources/lang/af/admin/hardware/table.php @@ -19,6 +19,7 @@ return array( 'status' => 'status', 'title' => 'bate', 'image' => 'Toestelbeeld', - 'days_without_acceptance' => 'Dae sonder aanvaarding' + 'days_without_acceptance' => 'Dae sonder aanvaarding', + 'monthly_depreciation' => 'Maandelikse Waardevermindering' ); diff --git a/resources/lang/en-GB/admin/hardware/table.php b/resources/lang/en-GB/admin/hardware/table.php index e8baa09d5a..38788e1984 100644 --- a/resources/lang/en-GB/admin/hardware/table.php +++ b/resources/lang/en-GB/admin/hardware/table.php @@ -19,6 +19,7 @@ return array( 'status' => 'Status', 'title' => 'Asset ', 'image' => 'Device Image', - 'days_without_acceptance' => 'Days Without Acceptance' + 'days_without_acceptance' => 'Days Without Acceptance', + 'monthly_depreciation' => 'Monthly Depreciation' ); diff --git a/resources/lang/en/admin/hardware/table.php b/resources/lang/en/admin/hardware/table.php index e8baa09d5a..38788e1984 100644 --- a/resources/lang/en/admin/hardware/table.php +++ b/resources/lang/en/admin/hardware/table.php @@ -19,6 +19,7 @@ return array( 'status' => 'Status', 'title' => 'Asset ', 'image' => 'Device Image', - 'days_without_acceptance' => 'Days Without Acceptance' + 'days_without_acceptance' => 'Days Without Acceptance', + 'monthly_depreciation' => 'Monthly Depreciation' ); diff --git a/resources/views/reports/depreciation.blade.php b/resources/views/reports/depreciation.blade.php index e7fdf8a35f..504e69c42f 100644 --- a/resources/views/reports/depreciation.blade.php +++ b/resources/views/reports/depreciation.blade.php @@ -51,9 +51,10 @@ {{ trans('admin/hardware/table.location') }} {{ trans('admin/hardware/table.purchase_date') }} {{ trans('admin/hardware/table.eol') }} - {{ trans('admin/hardware/table.purchase_cost') }} - {{ trans('admin/hardware/table.book_value') }} - {{ trans('admin/hardware/table.diff') }} + {{ trans('admin/hardware/table.purchase_cost') }} + {{ trans('admin/hardware/table.book_value') }} + {{ trans('admin/hardware/table.monthly_depreciation') }} + {{ trans('admin/hardware/table.diff') }} @@ -129,6 +130,17 @@ {{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }} + + @if ($asset->model->depreciation) + @if ($asset->location && $asset->location->currency) + {{ $asset->location->currency }} + @else + {{ $snipeSettings->default_currency }} + @endif + + {{ \App\Helpers\Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0)) }} + @endif + @if ($asset->location && $asset->location->currency) {{ $asset->location->currency }} @@ -142,6 +154,7 @@ + @endif @endforeach