diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 70ffa6ea006..730c75867d6 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2071,7 +2071,7 @@ class Form
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_product = p.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e on ps.fk_entrepot = e.rowid";
}
-
+
// include search in supplier ref
if(!empty($conf->global->MAIN_SEARCH_PRODUCT_BY_FOURN_REF))
{
@@ -3508,7 +3508,7 @@ class Form
{
$unitLabel = $langs->trans('unit'.$res->code)!=$res->label?$langs->trans('unit'.$res->code):$res->label;
}
-
+
if ($selected == $res->rowid)
{
$return.='';
@@ -7145,7 +7145,7 @@ class Form
}
/**
- * Return HTML to show the select categories of expense category
+ * Return HTML to show the select of expense categories
*
* @param string $selected preselected category
* @param string $htmlname name of HTML select list
@@ -7161,7 +7161,7 @@ class Form
global $db, $conf, $langs, $user;
$sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1';
- $sql.= ' AND entity IN (0,'.getEntity('').')';
+ $sql.= ' AND entity IN (0,'.getEntity('exp_tax_cat').')';
if (!empty($excludeid)) $sql.= ' AND rowid NOT IN ('.implode(',', $excludeid).')';
$sql.= ' ORDER BY label';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d15d07e4c6e..10aa25c86ba 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7682,7 +7682,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
{
$dictvalues[$tablename] = array();
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
- if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity('').')';
+ if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity($tablename).')';
$resql = $db->query($sql);
if ($resql)