changed condition

This commit is contained in:
spencerrlongg 2024-01-29 20:44:26 -06:00
parent 3da7876631
commit d0a82adc3f

View file

@ -146,7 +146,8 @@ class AssetsController extends Controller
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString(); $asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
} }
if ($asset->assigned_to == '') { // Set location_id to rtd_location_id ONLY if the asset isn't being checked out
if (!request('assigned_user') && !request('assigned_asset') && !request('assigned_location')) {
$asset->location_id = $request->input('rtd_location_id', null); $asset->location_id = $request->input('rtd_location_id', null);
} }