|
@@ -1356,6 +1356,8 @@ abstract class CommonObject
|
|
|
if ($resql) {
|
|
|
$num = $this->db->num_rows($resql);
|
|
|
if ($num > 0) {
|
|
|
+ $langs->loadLangs(array("propal", "orders", "bills", "suppliers", "contracts", "supplier_proposal"));
|
|
|
+
|
|
|
while ($obj = $this->db->fetch_object($resql)) {
|
|
|
$modulename = $obj->element;
|
|
|
if (strpos($obj->element, 'project') !== false) {
|
|
@@ -1371,11 +1373,15 @@ abstract class CommonObject
|
|
|
}
|
|
|
if ($conf->{$modulename}->enabled) {
|
|
|
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
|
|
|
- $transkey = "TypeContact_".$obj->element."_".$source."_".$obj->code;
|
|
|
+ $tmpelement = $obj->element;
|
|
|
+ $transkey = "TypeContact_".$tmpelement."_".$source."_".$obj->code;
|
|
|
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
|
|
- if (empty($option))
|
|
|
+ if (empty($option)) {
|
|
|
$tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
|
|
|
- else $tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|