From f144d671ff400b9a1c740128335389aff9106263 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 12 Feb 2018 19:13:33 -0800 Subject: [PATCH] Fixed #4988 - incorrect variable name in asset checkout API method --- app/Http/Controllers/Api/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index ef89f948a..6d8c52d72 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -557,7 +557,7 @@ class AssetsController extends Controller $error_payload['target_type'] = 'location'; } elseif (request('checkout_to_type')=='asset') { - $target = Asset::where('id','!=',$assetId)->find(request('assigned_asset')); + $target = Asset::where('id','!=',$asset_id)->find(request('assigned_asset')); $asset->location_id = $target->rtd_location_id; // Override with the asset's location_id if it has one if ($target->location_id!='') {