diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 376745c3d55..8c793de43fc 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -331,25 +331,27 @@ if ($id > 0) print ""; print ''; - // Compte bancaire par défaut - print ''; - print ''; - print '
'; - print $langs->trans('PaymentBankAccount'); - print ''; - if (($action != 'editbankaccount') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; - print ''; - if ($action == 'editbankaccount') + if (! empty($conf->banque->enabled)) { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1); + // Compte bancaire par défaut + print ''; + print ''; + print '
'; + print $langs->trans('PaymentBankAccount'); + print ''; + if (($action != 'editbankaccount') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') + { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1); + } + else + { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none'); + } + print ""; + print ''; } - else - { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none'); - } - print ""; - print ''; - // Relative discounts (Discounts-Drawbacks-Rebates) print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 28469e8f3a2..7df18ebba43 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4297,7 +4297,7 @@ class Form */ function select_currency($selected='',$htmlname='currency_id') { - print $this->selectcurrency($selected,$htmlname); + print $this->selectCurrency($selected,$htmlname); } /** @@ -4307,35 +4307,40 @@ class Form * @param string $htmlname name of HTML select list * @return string */ - function selectCurrency($selected='',$htmlname='currency_id') - { - global $conf,$langs,$user; + function selectCurrency($selected='',$htmlname='currency_id') + { + global $conf,$langs,$user; - $langs->loadCacheCurrencies(''); + $langs->loadCacheCurrencies(''); - $out=''; + $out=''; - if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite + if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite - $out.= ''; - if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); - return $out; - } + $out.= ''; + if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); + + // Make select dynamic + include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname); + + return $out; + } /** * Return array of currencies in user language diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f1aa542d7ae..0fe1040b389 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - admin Foundation=Foundation Version=Version +Publisher=Publisher VersionProgram=Version program VersionLastInstall=Initial install version VersionLastUpgrade=Latest version upgrade