|
@@ -1279,7 +1279,7 @@ abstract class CommonObject
|
|
|
$sql .= ", t.fk_soc as socid, t.statut as statuscontact";
|
|
|
}
|
|
|
$sql .= ", t.civility as civility, t.lastname as lastname, t.firstname, t.email";
|
|
|
- $sql .= ", tc.source, tc.element, tc.code, tc.libelle";
|
|
|
+ $sql .= ", tc.source, tc.element, tc.code, tc.libelle as type_label";
|
|
|
$sql .= " FROM ".$this->db->prefix()."c_type_contact tc,";
|
|
|
$sql .= " ".$this->db->prefix()."element_contact ec";
|
|
|
if ($source == 'internal') { // internal contact (user)
|
|
@@ -1322,7 +1322,7 @@ abstract class CommonObject
|
|
|
|
|
|
if (!$list) {
|
|
|
$transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
|
|
|
- $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
|
|
+ $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
|
|
|
$tab[$i] = array(
|
|
|
'parentId' => $this->id,
|
|
|
'source' => $obj->source,
|
|
@@ -1367,7 +1367,7 @@ abstract class CommonObject
|
|
|
public function swapContactStatus($rowid)
|
|
|
{
|
|
|
$sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,";
|
|
|
- $sql .= " tc.code, tc.libelle";
|
|
|
+ $sql .= " tc.code, tc.libelle as type_label";
|
|
|
$sql .= " FROM (".$this->db->prefix()."element_contact as ec, ".$this->db->prefix()."c_type_contact as tc)";
|
|
|
$sql .= " WHERE ec.rowid =".((int) $rowid);
|
|
|
$sql .= " AND ec.fk_c_type_contact=tc.rowid";
|
|
@@ -1412,7 +1412,7 @@ abstract class CommonObject
|
|
|
}
|
|
|
|
|
|
$tab = array();
|
|
|
- $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position";
|
|
|
+ $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position";
|
|
|
$sql .= " FROM ".$this->db->prefix()."c_type_contact as tc";
|
|
|
$sql .= " WHERE tc.element='".$this->db->escape($this->element)."'";
|
|
|
if ($activeonly == 1) {
|
|
@@ -1435,7 +1435,7 @@ abstract class CommonObject
|
|
|
$obj = $this->db->fetch_object($resql);
|
|
|
|
|
|
$transkey = "TypeContact_".$this->element."_".$source."_".$obj->code;
|
|
|
- $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
|
|
+ $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
|
|
|
if (empty($option)) {
|
|
|
$tab[$obj->rowid] = $libelle_type;
|
|
|
} else {
|
|
@@ -1470,7 +1470,7 @@ abstract class CommonObject
|
|
|
|
|
|
$tab = array();
|
|
|
|
|
|
- $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position, tc.element";
|
|
|
+ $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element";
|
|
|
$sql .= " FROM ".$this->db->prefix()."c_type_contact as tc";
|
|
|
|
|
|
$sqlWhere = array();
|
|
@@ -1523,7 +1523,7 @@ abstract class CommonObject
|
|
|
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
|
|
|
$tmpelement = $obj->element;
|
|
|
$transkey = "TypeContact_".$tmpelement."_".$source."_".$obj->code;
|
|
|
- $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
|
|
+ $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
|
|
|
if (empty($option)) {
|
|
|
$tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
|
|
|
} else {
|