[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:
parent
56dc321665
commit
75ce3e8513
1 changed files with 2 additions and 1 deletions
|
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue