diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index 418b70473..52f3588e9 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -103,6 +103,8 @@ class BulkAssetsController extends Controller || ($request->filled('company_id')) || ($request->filled('status_id')) || ($request->filled('model_id')) + || ($request->filled('null_purchase_date')) + || ($request->filled('null_expected_checkin_date')) ) { foreach ($assets as $assetId) { @@ -117,6 +119,14 @@ class BulkAssetsController extends Controller ->conditionallyAddItem('supplier_id') ->conditionallyAddItem('warranty_months'); + if ($request->input('null_purchase_date')=='1') { + $this->update_array['purchase_date'] = null; + } + + if ($request->input('null_expected_checkin_date')=='1') { + $this->update_array['expected_checkin'] = null; + } + if ($request->filled('purchase_cost')) { $this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost')); } diff --git a/resources/lang/en/admin/hardware/form.php b/resources/lang/en/admin/hardware/form.php index b2d7bab0f..22aac61d0 100644 --- a/resources/lang/en/admin/hardware/form.php +++ b/resources/lang/en/admin/hardware/form.php @@ -6,7 +6,7 @@ return [ 'bulk_delete_warn' => 'You are about to delete :asset_count assets.', 'bulk_update' => 'Bulk Update Assets', 'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ', - 'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.', + 'bulk_update_warn' => 'You are about to edit the properties of a single asset.|You are about to edit the properties of :asset_count assets.', 'checkedout_to' => 'Checked Out To', 'checkout_date' => 'Checkout Date', 'checkin_date' => 'Checkin Date', diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 36b47c195..6a2bc3508 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -371,6 +371,7 @@ return [ 'bulk_soft_delete' =>'Also soft-delete these users. Their asset history will remain intact unless/until you purge deleted records in the Admin Settings.', 'bulk_checkin_delete_success' => 'Your selected users have been deleted and their items have been checked in.', 'bulk_checkin_success' => 'The items for the selected users have been checked in.', + 'set_to_null' => 'Delete values for this asset|Delete values for all :asset_count assets ', ]; \ No newline at end of file diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index b508db0b8..2ecf7bee4 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -20,7 +20,7 @@
{{ trans('admin/hardware/form.bulk_update_help') }}