A free open source IT asset/license management system
moving warranty/depreciation to be with the other cost/eol values
akemidx5944034b8b32
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.phpindex 05cc2e7dfa..bd22562a62 100644--- a/app/Http/Controllers/ReportsController.php+++ b/app/Http/Controllers/ReportsController.php@@ -493,6 +493,17 @@ class ReportsController extends Controller$header[] = trans('admin/hardware/table.eol');}+ if ($request->filled('warranty')) {+ $header[] = trans('admin/hardware/form.warranty');+ $header[] = trans('admin/hardware/form.warranty_expires');+ }++ if ($request->filled('depreciation')) {+ $header[] = trans('admin/hardware/table.book_value');+ $header[] = trans('admin/hardware/table.diff');+ $header[] = trans('admin/hardware/form.fully_depreciated');+ }+if ($request->filled('order')) {$header[] = trans('admin/hardware/form.order');}@@ -579,17 +590,6 @@ class ReportsController extends Controller$header[] = trans('general.status');}- if ($request->filled('warranty')) {- $header[] = trans('admin/hardware/form.warranty');- $header[] = trans('admin/hardware/form.warranty_expires');- }-- if ($request->filled('depreciation')) {- $header[] = trans('admin/hardware/table.book_value');- $header[] = trans('admin/hardware/table.diff');- $header[] = trans('admin/hardware/form.fully_depreciated');- }-if ($request->filled('checkout_date')) {$header[] = trans('admin/hardware/table.checkout_date');}@@ -805,6 +805,19 @@ class ReportsController extends Controller$row[] = ($asset->purchase_date != '') ? $asset->asset_eol_date : '';}+ if ($request->filled('warranty')) {+ $row[] = ($asset->warranty_months) ? $asset->warranty_months : '';+ $row[] = $asset->present()->warranty_expires();+ }++ if ($request->filled('depreciation')) {+ $depreciation = $asset->getDepreciatedValue();+ $diff = ($asset->purchase_cost - $depreciation);+ $row[] = Helper::formatCurrencyOutput($depreciation);+ $row[] = Helper::formatCurrencyOutput($diff);+ $row[] = (($asset->depreciation) && ($asset->depreciated_date())) ? $asset->depreciated_date()->format('Y-m-d') : '';+ }+if ($request->filled('order')) {$row[] = ($asset->order_number) ? $asset->order_number : '';}@@ -938,19 +951,6 @@ class ReportsController extends Controller$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';}- if ($request->filled('warranty')) {- $row[] = ($asset->warranty_months) ? $asset->warranty_months : '';- $row[] = $asset->present()->warranty_expires();- }-- if ($request->filled('depreciation')) {- $depreciation = $asset->getDepreciatedValue();- $diff = ($asset->purchase_cost - $depreciation);- $row[] = Helper::formatCurrencyOutput($depreciation);- $row[] = Helper::formatCurrencyOutput($diff);- $row[] = (($asset->depreciation) && ($asset->depreciated_date())) ? $asset->depreciated_date()->format('Y-m-d') : '';- }-if ($request->filled('checkout_date')) {$row[] = ($asset->last_checkout) ? $asset->last_checkout : '';}diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.phpindex 2ef3acfd7d..82db5fa4a4 100644--- a/resources/views/reports/custom.blade.php+++ b/resources/views/reports/custom.blade.php@@ -147,6 +147,16 @@{{ trans('admin/hardware/form.eol_date') }}</label>+ <label class="form-control">+ <input type="checkbox" name="warranty" value="1" @checked($template->checkmarkValue('warranty')) />+ {{ trans('admin/hardware/form.warranty') }}+ </label>++ <label class="form-control">+ <input type="checkbox" name="depreciation" value="1" @checked($template->checkmarkValue('depreciation')) />+ {{ trans('general.depreciation') }}+ </label>+<label class="form-control"><input type="checkbox" name="order" value="1" @checked($template->checkmarkValue('order')) />{{ trans('admin/hardware/form.order') }}@@ -182,16 +192,6 @@{{ trans('general.status') }}</label>- <label class="form-control">- <input type="checkbox" name="warranty" value="1" @checked($template->checkmarkValue('warranty')) />- {{ trans('admin/hardware/form.warranty') }}- </label>-- <label class="form-control">- <input type="checkbox" name="depreciation" value="1" @checked($template->checkmarkValue('depreciation')) />- {{ trans('general.depreciation') }}- </label>-<label class="form-control"><input type="checkbox" name="checkout_date" value="1" @checked($template->checkmarkValue('checkout_date')) />{{ trans('admin/hardware/table.checkout_date') }}