diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 42468973a69..4a3561149ec 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5048,9 +5048,11 @@ class Form
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @param integer $useempty 1=Add empty line
+ * @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)')
+ * @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available. true = we are in currency_rate update , we don't want to see conf->currency in select
* @return string
*/
- public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0)
+ public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false)
{
global $db, $conf, $langs, $user;
@@ -5060,6 +5062,7 @@ class Form
$sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'multicurrency';
$sql .= " WHERE entity IN ('".getEntity('mutlicurrency')."')";
+ if ($filter) $sql .= " AND ".$filter;
$resql = $this->db->query($sql);
if ($resql)
{
@@ -5070,7 +5073,7 @@ class Form
$out .= '