diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index c27cfe3e0c6..01c2cb2fa98 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -245,10 +245,12 @@ public function update(Request $request) : RedirectResponse || ($request->filled('status_id')) || ($request->filled('model_id')) || ($request->filled('next_audit_date')) + || ($request->filled('asset_eol_date')) || ($request->filled('null_name')) || ($request->filled('null_purchase_date')) || ($request->filled('null_expected_checkin_date')) || ($request->filled('null_next_audit_date')) + || ($request->filled('null_asset_eol_date')) || ($request->anyFilled($custom_field_columns)) ) { @@ -271,7 +273,8 @@ public function update(Request $request) : RedirectResponse ->conditionallyAddItem('requestable') ->conditionallyAddItem('supplier_id') ->conditionallyAddItem('warranty_months') - ->conditionallyAddItem('next_audit_date'); + ->conditionallyAddItem('next_audit_date') + ->conditionallyAddItem('asset_eol_date'); foreach ($custom_field_columns as $key => $custom_field_column) { $this->conditionallyAddItem($custom_field_column); } @@ -316,6 +319,13 @@ public function update(Request $request) : RedirectResponse $this->update_array['next_audit_date'] = null; } + if ($request->input('null_asset_eol_date')=='1') { + $this->update_array['asset_eol_date'] = null; + $this->update_array['eol_explicit'] = 1; + } + + + if ($request->filled('purchase_cost')) { $this->update_array['purchase_cost'] = $request->input('purchase_cost'); } diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index 644637ff2db..73594ca6b2d 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -91,6 +91,24 @@ + +
+ +
+
+ + +
+ {!! $errors->first('asset_eol_date', ' :message') !!} +
+
+ +
+
+