Merge pull request #13655 from snipe/bug/sc-23759

Fixed bug where checkout to location would throw an error if FMCS was enabled
This commit is contained in:
snipe 2023-09-26 14:37:36 +01:00 committed by GitHub
commit 1509339b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -91,7 +91,8 @@ class AssetCheckoutController extends Controller
$settings = \App\Models\Setting::getSettings();
if ($settings->full_multiple_companies_support){
// We have to check whether $target->company_id is null here since locations don't have a company yet
if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {
if ($target->company_id != $asset->company_id){
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('general.error_user_company'));
}

View file

@ -459,7 +459,7 @@ return [
'serial_number' => 'Serial Number',
'item_notes' => ':item Notes',
'item_name_var' => ':item Name',
'error_user_company' => 'User and Asset companies missmatch',
'error_user_company' => 'Checkout target company and asset company do not match',
'error_user_company_accept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager',
'importer' => [
'checked_out_to_fullname' => 'Checked Out to: Full Name',