Merge pull request #27080 from altairisfr/nocompany

NEW : add constant TICKETS_NO_COMPANY_ON_FORM
This commit is contained in:
Laurent Destailleur
2024-03-19 16:54:47 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ class FormTicket
$this->action = 'add';
$this->withcompany = isModEnabled("societe");
$this->withcompany = !getDolGlobalInt("TICKETS_NO_COMPANY_ON_FORM") && isModEnabled("societe");
$this->withfromsocid = 0;
$this->withfromcontactid = 0;
$this->withreadid=0;
@@ -546,7 +546,7 @@ class FormTicket
// Customer or supplier
if ($this->withcompany) {
// altairis: force company and contact id for external user
// force company and contact id for external user
if (empty($user->socid)) {
// Company
print '<tr><td class="titlefield">'.$langs->trans("ThirdParty").'</td><td>';

View File

@@ -2880,7 +2880,7 @@ class Ticket extends CommonObject
$message .= '<br><br>';
foreach ($external_contacts as $key => $info_sendto) {
// altairis: avoid duplicate emails to external contacts
// avoid duplicate emails to external contacts
if ($info_sendto['id'] == $user->contact_id) {
continue;
}