From d0a82adc3f6b18d8c7828b00e1870c2a449d118a Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Mon, 29 Jan 2024 20:44:26 -0600 Subject: [PATCH] changed condition --- app/Http/Controllers/Assets/AssetsController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index e4a6e792af..930fa17632 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -146,7 +146,8 @@ class AssetsController extends Controller $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); }