mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Adds expected checkin to custom reports
This commit is contained in:
parent
cbabcb9197
commit
37a6599978
|
@ -573,6 +573,10 @@ class ReportsController extends Controller
|
|||
$header[] = 'Value';
|
||||
$header[] = 'Diff';
|
||||
}
|
||||
if (e(Input::get('expected_checkin')) == '1') {
|
||||
$header[] = trans('admin/hardware/form.expected_checkin');
|
||||
}
|
||||
|
||||
|
||||
foreach ($customfields as $customfield) {
|
||||
if (e(Input::get($customfield->db_column_name())) == '1') {
|
||||
|
@ -701,6 +705,13 @@ class ReportsController extends Controller
|
|||
$row[] = '"' . Helper::formatCurrencyOutput($depreciation) . '"';
|
||||
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
|
||||
}
|
||||
if (e(Input::get('expected_checkin')) == '1') {
|
||||
if ($asset->expected_checkin) {
|
||||
$row[] = '"' .e($asset->expected_checkin). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if blankd
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($customfields as $customfield) {
|
||||
$column_name = $customfield->db_column_name();
|
||||
|
|
|
@ -146,6 +146,15 @@
|
|||
{{ trans('general.depreciation') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('expected_checkin', '1') }}
|
||||
{{ trans('admin/hardware/form.expected_checkin') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@foreach ($customfields as $customfield)
|
||||
<div class="checkbox col-md-12">
|
||||
|
|
Loading…
Reference in a new issue