mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Check for nullifying checkboxes
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
491cdd4de6
commit
91e824c5b0
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue