diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 8cae0e3dbf..47083f5fe8 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -362,7 +362,7 @@ class AssetsController extends Controller 'assets.assigned_to', 'assets.assigned_type', 'assets.status_id' - ])->with('model', 'assetstatus', 'assignedTo')->NotArchived()); + ])->with('model', 'assetstatus', 'assignedTo')->NotArchived(), 'company_id', 'assets'); if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') { $assets = $assets->RTD(); diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index acf2596034..399aa2c60e 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -156,8 +156,9 @@ class AssetsController extends Controller $image = $request->input('image'); - $asset->asset_tag = $asset_tags[$a]; + $asset->asset_tag = $asset_tags[$a]; $asset = $request->handleImages($asset); + } // Update custom fields in the database.