diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 0646c7f6d46..9d0a7d57a85 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -34,6 +34,10 @@ if (!$user->admin) accessforbidden(); $action = GETPOST('action', 'alpha'); $currencycode = GETPOST('currencycode', 'alpha'); +if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + $currencycode = (!empty($currencycode) ? $currencycode : $conf->currency); +} + $mainmaxdecimalsunit = 'MAIN_MAX_DECIMALS_UNIT'.(!empty($currencycode) ? '_'.$currencycode : ''); $mainmaxdecimalstot = 'MAIN_MAX_DECIMALS_TOT'.(!empty($currencycode) ? '_'.$currencycode : ''); $mainmaxdecimalsshown = 'MAIN_MAX_DECIMALS_SHOWN'.(!empty($currencycode) ? '_'.$currencycode : ''); @@ -94,7 +98,6 @@ llxHeader(); print load_fiche_titre($langs->trans("LimitsSetup"), '', 'title_setup'); -$currencycode = (!empty($currencycode) ? $currencycode : $conf->currency); $aCurrencies = array($conf->currency); // Default currency always first position if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) @@ -162,9 +165,7 @@ if ($action == 'edit') print ''; print '
'; -} -else -{ +} else { print ''; print ''; @@ -203,9 +204,7 @@ if (empty($mysoc->country_code)) $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete")); print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").''; -} -else -{ +} else { // Show examples print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', ''); @@ -252,8 +251,7 @@ else $vat_rates[$i] = $obj->vat_rate; } } - } - else dol_print_error($db); + } else dol_print_error($db); if (count($vat_rates)) { @@ -269,9 +267,7 @@ else print '   ->   '.$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."
\n"; } } - } - else - { + } else { // More examples if not specific vat rate found // This example must be kept for test purpose with current value because value used (2/7, 10/3, and vat 0, 10) // were calculated to show all possible cases of rounding. If we change this, examples becomes useless or show the same rounding rule.
'.$langs->trans("Parameter").''.$langs->trans("Value").'