mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #13197 from akemidx/current_value_for_assets
Current value added to asset index page
This commit is contained in:
commit
a19a508a80
|
@ -501,7 +501,6 @@ class ReportsController extends Controller
|
|||
$header[] = trans('general.zip');
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('assigned_to')) {
|
||||
$header[] = trans('admin/hardware/table.checkoutto');
|
||||
$header[] = trans('general.type');
|
||||
|
@ -532,13 +531,14 @@ class ReportsController extends Controller
|
|||
}
|
||||
|
||||
if ($request->filled('warranty')) {
|
||||
$header[] = 'Warranty';
|
||||
$header[] = 'Warranty Expires';
|
||||
$header[] = trans('admin/hardware/form.warranty');
|
||||
$header[] = trans('admin/hardware/form.warranty_expires');
|
||||
}
|
||||
|
||||
if ($request->filled('depreciation')) {
|
||||
$header[] = 'Value';
|
||||
$header[] = 'Diff';
|
||||
$header[] = 'Fully Depreciated';
|
||||
$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')) {
|
||||
|
|
|
@ -92,6 +92,7 @@ class AssetsTransformer
|
|||
'checkout_counter' => (int) $asset->checkout_counter,
|
||||
'requests_counter' => (int) $asset->requests_counter,
|
||||
'user_can_checkout' => (bool) $asset->availableForCheckout(),
|
||||
'book_value' => Helper::formatCurrencyOutput($asset->getLinearDepreciatedValue()),
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -153,6 +153,13 @@ class AssetPresenter extends Presenter
|
|||
'title' => trans('general.purchase_cost'),
|
||||
'footerFormatter' => 'sumFormatter',
|
||||
'class' => 'text-right',
|
||||
], [
|
||||
"field" => "book_value",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"title" => trans('admin/hardware/table.book_value'),
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
"class" => "text-right",
|
||||
],[
|
||||
'field' => 'order_number',
|
||||
'searchable' => true,
|
||||
|
|
Loading…
Reference in a new issue