mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge pull request #12704 from snipe/features/next_audit_date
Added next audit date override in bulk asset edit
This commit is contained in:
commit
7059a57be1
|
@ -102,8 +102,11 @@ class BulkAssetsController extends Controller
|
||||||
|| ($request->filled('company_id'))
|
|| ($request->filled('company_id'))
|
||||||
|| ($request->filled('status_id'))
|
|| ($request->filled('status_id'))
|
||||||
|| ($request->filled('model_id'))
|
|| ($request->filled('model_id'))
|
||||||
|
|| ($request->filled('next_audit_date'))
|
||||||
|| ($request->filled('null_purchase_date'))
|
|| ($request->filled('null_purchase_date'))
|
||||||
|| ($request->filled('null_expected_checkin_date'))
|
|| ($request->filled('null_expected_checkin_date'))
|
||||||
|
|| ($request->filled('null_next_audit_date'))
|
||||||
|
|
||||||
) {
|
) {
|
||||||
foreach ($assets as $assetId) {
|
foreach ($assets as $assetId) {
|
||||||
|
|
||||||
|
@ -116,7 +119,8 @@ class BulkAssetsController extends Controller
|
||||||
->conditionallyAddItem('requestable')
|
->conditionallyAddItem('requestable')
|
||||||
->conditionallyAddItem('status_id')
|
->conditionallyAddItem('status_id')
|
||||||
->conditionallyAddItem('supplier_id')
|
->conditionallyAddItem('supplier_id')
|
||||||
->conditionallyAddItem('warranty_months');
|
->conditionallyAddItem('warranty_months')
|
||||||
|
->conditionallyAddItem('next_audit_date');
|
||||||
|
|
||||||
if ($request->input('null_purchase_date')=='1') {
|
if ($request->input('null_purchase_date')=='1') {
|
||||||
$this->update_array['purchase_date'] = null;
|
$this->update_array['purchase_date'] = null;
|
||||||
|
@ -126,6 +130,10 @@ class BulkAssetsController extends Controller
|
||||||
$this->update_array['expected_checkin'] = null;
|
$this->update_array['expected_checkin'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->input('null_next_audit_date')=='1') {
|
||||||
|
$this->update_array['next_audit_date'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->filled('purchase_cost')) {
|
if ($request->filled('purchase_cost')) {
|
||||||
$this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost'));
|
$this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,6 +144,25 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Next audit Date -->
|
||||||
|
<div class="form-group {{ $errors->has('expected_checkin') ? ' has-error' : '' }}">
|
||||||
|
<label for="next_audit_date" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||||
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date') }}">
|
||||||
|
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('null_next_audit_date', '1', false, ['class' => 'minimal']) }}
|
||||||
|
{{ trans_choice('general.set_to_null', count($assets), ['asset_count' => count($assets)]) }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Requestable -->
|
<!-- Requestable -->
|
||||||
<div class="form-group {{ $errors->has('requestable') ? ' has-error' : '' }}">
|
<div class="form-group {{ $errors->has('requestable') ? ' has-error' : '' }}">
|
||||||
<div class="control-label col-md-3">
|
<div class="control-label col-md-3">
|
||||||
|
|
Loading…
Reference in a new issue