diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 4f8b20293f1..482e6af0088 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -769,7 +769,8 @@ class FormTicket $formcontract = new FormContract($this->db); print ''; 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 ''; } }