Fix bug in output extrafields sell list

This commit is contained in:
Florian HENRY 2014-08-11 13:09:35 +02:00
parent 2c1db4cdd2
commit 6849f713b5

View File

@ -971,15 +971,15 @@ class ExtraFields
$value=''; // value was used, so now we reste it to use it to build final output $value=''; // value was used, so now we reste it to use it to build final output
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
// Several field into label (eq table:code|libelle:rowid) // Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|',$InfoFieldList[1]); $fields_label = explode('|',$InfoFieldList[1]);
if(is_array($fields_label)) if(is_array($fields_label))
{ {
foreach ($fields_label as $field_toshow) foreach ($fields_label as $field_toshow)
{ {
$translabel=$langs->trans($obj->field_toshow); $translabel=$langs->trans($obj->$field_toshow);
if ($translabel!=$field_toshow) { if ($translabel!=$field_toshow) {
$value.=dol_trunc($translabel,18).' '; $value.=dol_trunc($translabel,18).' ';
}else { }else {