Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
277655b911
@ -893,6 +893,7 @@ class Contact extends CommonObject
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||
$sql.=" WHERE ec.fk_c_type_contact = tc.rowid";
|
||||
$sql.=" AND fk_socpeople = ". $this->id;
|
||||
$sql.=" AND tc.source = 'external'";
|
||||
$sql.=" GROUP BY tc.element";
|
||||
|
||||
dol_syslog(get_class($this)."::load_ref_elements", LOG_DEBUG);
|
||||
|
||||
@ -3503,13 +3503,19 @@ class Form
|
||||
|
||||
while($res = $this->db->fetch_object($resql))
|
||||
{
|
||||
$unitLabel = $res->label;
|
||||
if (! empty($langs->tab_translate['unit'.$res->code])) // check if Translation is available before
|
||||
{
|
||||
$unitLabel = $langs->trans('unit'.$res->code)!=$res->label?$langs->trans('unit'.$res->code):$res->label;
|
||||
}
|
||||
|
||||
if ($selected == $res->rowid)
|
||||
{
|
||||
$return.='<option value="'.$res->rowid.'" selected>'.($langs->trans('unit'.$res->code)!=$res->label?$langs->trans('unit'.$res->code):$res->label).'</option>';
|
||||
$return.='<option value="'.$res->rowid.'" selected>'.$unitLabel.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$return.='<option value="'.$res->rowid.'">'.($langs->trans('unit'.$res->code)!=$res->label?$langs->trans('unit'.$res->code):$res->label).'</option>';
|
||||
$return.='<option value="'.$res->rowid.'">'.$unitLabel.'</option>';
|
||||
}
|
||||
}
|
||||
$return.='</select>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user