diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 6b216d6dec..356f029780 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -265,13 +265,8 @@ class AssetsController extends Controller if ($asset->save()) { if (Input::get('assigned_to')!='') { - $logaction = new Actionlog(); - $logaction->asset_id = $asset->id; - $logaction->checkedout_to = $asset->assigned_to; - $logaction->asset_type = 'hardware'; - $logaction->user_id = Auth::user()->id; - $logaction->note = e(Input::get('note')); - $log = $logaction->logaction('checkout'); + $user = User::find(e(Input::get('assigned_to'))); + $asset->checkOutToUser($user, Auth::user(), date('Y-m-d h:i:s'), '', 'Checked out on asset creation', e(Input::get('name'))); } // Redirect to the asset listing page \Session::flash('success', trans('admin/hardware/message.create.success')); diff --git a/config/version.php b/config/version.php index daed147dbf..2eba745d05 100644 --- a/config/version.php +++ b/config/version.php @@ -1,5 +1,5 @@ 'v3.1.0', - 'hash_version' => 'v3.1.0-29-gd6ba0b6', -); \ No newline at end of file + 'app_version' => 'v3.1', + 'hash_version' => 'v3.1-110-g1612562', +);