[FIX] Update ticket create form to hide contracts from other thirdparties for external users (#31762)

Co-authored-by: fhoedl <florian@hoedl.co>
This commit is contained in:
Florian Hödl 2024-11-12 00:36:34 +01:00 committed by GitHub
parent 56dc321665
commit 75ce3e8513
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -769,7 +769,8 @@ class FormTicket
$formcontract = new FormContract($this->db);
print '<tr><td><label for="contract"><span class="">'.$langs->trans("Contract").'</span></label></td><td>';
print img_picto('', 'contract', 'class="pictofixedwidth"');
print $formcontract->select_contract(-1, GETPOSTINT('contactid'), 'contractid', 0, 1, 1, 1);
// socid is for internal users null and not 0 or -1
print $formcontract->select_contract($user->socid ?? -1, GETPOSTINT('contactid'), 'contractid', 0, 1, 1, 1);
print '</td></tr>';
}
}