Merge pull request #14188 from spencerrlongg/bug/14146
Fixes Default Location Being Set During Asset Creation and Checkout
This commit is contained in:
commit
111daffc17
1 changed files with 2 additions and 1 deletions
|
@ -146,7 +146,8 @@ class AssetsController extends Controller
|
||||||
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
|
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($asset->assigned_to == '') {
|
// Set location_id to rtd_location_id ONLY if the asset isn't being checked out
|
||||||
|
if (!request('assigned_user') && !request('assigned_asset') && !request('assigned_location')) {
|
||||||
$asset->location_id = $request->input('rtd_location_id', null);
|
$asset->location_id = $request->input('rtd_location_id', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue