Merge branch 'develop'

# Conflicts:
#	config/version.php
This commit is contained in:
snipe 2018-01-17 12:41:51 -08:00
commit e35b3745eb
2 changed files with 18 additions and 4 deletions

View file

@ -1198,9 +1198,14 @@ class AssetsController extends Controller
$user = User::find(e(Input::get('assigned_to')));
$admin = Auth::user();
if (!$user) {
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.user_does_not_exist'));
}
if (!is_array(Input::get('selected_assets'))) {
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
}
$asset_ids = array_filter(Input::get('selected_assets'));
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
@ -1215,6 +1220,7 @@ class AssetsController extends Controller
$expected_checkin = '';
}
$errors = [];
DB::transaction(function () use ($user, $admin, $checkout_at, $expected_checkin, $errors, $asset_ids) {
@ -1223,6 +1229,14 @@ class AssetsController extends Controller
$this->authorize('checkout', $asset);
$error = $asset->checkOut($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
if ($user->location_id!='') {
$asset->location_id = $user->location_id;
$asset->unsetEventDispatcher();
$asset->save();
}
if ($error) {
array_merge_recursive($errors, $asset->getErrors()->toArray());
}

View file

@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v4.1.10-pre',
'full_app_version' => 'v4.1.10-pre - build 3204-g09eff88',
'build_version' => '3204',
'full_app_version' => 'v4.1.10-pre - build 3210-g0eff821',
'build_version' => '3210',
'prerelease_version' => '',
'hash_version' => 'g09eff88',
'full_hash' => 'v4.1.10-pre-74-g09eff88',
'hash_version' => 'g0eff821',
'full_hash' => 'v4.1.10-pre-80-g0eff821',
'branch' => 'master',
);