From 011726154c7dbf4e2d964682a01ad724a734a0ab Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 29 Jun 2023 03:16:59 -0600 Subject: [PATCH] Set rtd_location if a location is given at checkin --- app/Http/Controllers/Assets/AssetCheckinController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index 657b02171b..fa4fd52e7b 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -94,14 +94,15 @@ class AssetCheckinController extends Controller \Log::debug('Manually override the location IDs'); \Log::debug('Original Location ID: '.$asset->location_id); $asset->location_id = ''; - \Log::debug('New RTD Location ID: '.$asset->location_id); + \Log::debug('New Location ID: '.$asset->location_id); } $asset->location_id = $asset->rtd_location_id; if ($request->filled('location_id')) { \Log::debug('NEW Location ID: '.$request->get('location_id')); - $asset->location_id = e($request->get('location_id')); + $asset->location_id = $request->get('location_id'); + $asset->rtd_location_id = $request->get('location_id'); } $checkin_at = date('Y-m-d H:i:s');