diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 14f217247af..4ec38da3306 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4936,16 +4936,16 @@ class Form
* Constant MAIN_DEFAULT_PAYMENT_TERM_ID can be used to set default value but scope is all application, probably not what you want.
* See instead to force the default value by the caller.
*
- * @param int $selected Id of payment term to preselect by default
- * @param string $htmlname Nom de la zone select
- * @param int $filtertype If > 0, include payment terms with deposit percentage (for objects other than invoices and invoice templates)
- * @param int $addempty Add an empty entry
- * @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
- * @param string $morecss Add more CSS on select tag
- * @param float $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters)
- * 0 : use default deposit percentage from entry
- * > 0 : force deposit percentage (for example, from company object)
- * @return string String for the HTML select component
+ * @param int $selected Id of payment term to preselect by default
+ * @param string $htmlname Name of the select zone
+ * @param int $filtertype If > 0, include payment terms with deposit percentage (for objects other than invoices and invoice templates)
+ * @param int $addempty Add an empty entry
+ * @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
+ * @param string $morecss Add more CSS on select tag
+ * @param float $deposit_percent If < 0 : deposit_percent input makes no sense (for example, in list filters)
+ * If 0 : use default deposit percentage from entry
+ * If > 0 : force deposit percentage (for example, from company object)
+ * @return string String for the HTML select component
*/
public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1)
{
@@ -4957,9 +4957,9 @@ class Form
$this->load_cache_conditions_paiements();
// Set default value if not already set by caller
- if (empty($selected) && strpos($htmlname, 'search_') !== 0 && getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID')) {
+ if (empty($selected) && strpos($htmlname, 'search_') !== 0 && getDolGlobalInt('MAIN_DEFAULT_PAYMENT_TERM_ID')) {
dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TERM_ID", LOG_NOTICE);
- $selected = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID');
+ $selected = getDolGlobalInt('MAIN_DEFAULT_PAYMENT_TERM_ID');
}
$out .= '