Fix multicompany problem with extrafield list from table

This commit is contained in:
fhenry 2013-04-25 00:01:38 +02:00
parent 7fdf2f3482
commit 9a0f9477a6
2 changed files with 5 additions and 2 deletions

View File

@ -703,6 +703,7 @@ class ExtraFields
$sql = 'SELECT '.$keyList.', '.$InfoFieldList[1];
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
$sql.= ' WHERE entity = '.$conf->entity;
dol_syslog(get_class($this).':showInputField:$type=sellist sql='.$sql);
$resql = $this->db->query($sql);
@ -839,7 +840,8 @@ class ExtraFields
$sql = 'SELECT '.$InfoFieldList[1];
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
$sql.= ' where '.$keyList.'="'.$this->db->escape($value).'"';
$sql.= ' WHERE '.$keyList.'="'.$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)

View File

@ -67,7 +67,8 @@ if((($type == 'select') || ($type == 'checkbox') ||(($type == 'radio'))) && is_a
}
}
}elseif ($type== 'sellist') {
$param_chain = array_keys($param['options'])[0];
$paramlist=array_keys($param['options']);
$param_chain = $paramlist[0];
}
?>
<!-- Position -->