list contact check by module (#31845)

Co-authored-by: Rémi Champlon <r.champlon@vold.lu>
This commit is contained in:
Rémi Champlon 2024-11-15 16:02:11 +01:00 committed by GitHub
parent fd3482f331
commit f408803ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1572,7 +1572,7 @@ abstract class CommonObject
$tab = array();
$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element";
$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element, tc.module";
$sql .= " FROM ".$this->db->prefix()."c_type_contact as tc";
$sqlWhere = array();
@ -1609,7 +1609,7 @@ abstract class CommonObject
$langs->loadLangs(array("propal", "orders", "bills", "suppliers", "contracts", "supplier_proposal"));
while ($obj = $this->db->fetch_object($resql)) {
$modulename = $obj->element;
$modulename = $obj->module ?? $obj->element;
if (strpos($obj->element, 'project') !== false) {
$modulename = 'projet';
} elseif ($obj->element == 'contrat') {