Skip to content
Snippets Groups Projects
Commit 0e947716 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Bad output of extrafields when list is used.

parent 35ddcf29
No related branches found
No related tags found
No related merge requests found
......@@ -939,17 +939,20 @@ class ExtraFields
{
$sql.= ' as main';
}
$sql.= ' WHERE '.$selectkey.'=\''.$this->db->escape($value).'\'';
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
//$sql.= ' AND entity = '.$conf->entity;
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
$resql = $this->db->query($sql);
if ($resql)
{
$value=''; // value was used, so now we reste it to use it to build final output
$obj = $this->db->fetch_object($resql);
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|',$InfoFieldList[1]);
if(is_array($fields_label))
{
foreach ($fields_label as $field_toshow)
......@@ -972,6 +975,7 @@ class ExtraFields
}
}
}
else dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
}
elseif ($type == 'radio')
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment