|
@@ -1101,7 +1101,7 @@ if (!function_exists('dol_getprefix')) {
|
|
|
global $conf;
|
|
|
|
|
|
if (getDolGlobalString('MAIL_PREFIX_FOR_EMAIL_ID')) { // If MAIL_PREFIX_FOR_EMAIL_ID is set
|
|
|
- if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') {
|
|
|
+ if (getDolGlobalString('MAIL_PREFIX_FOR_EMAIL_ID') != 'SERVER_NAME') {
|
|
|
return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID;
|
|
|
} elseif (isset($_SERVER["SERVER_NAME"])) { // If MAIL_PREFIX_FOR_EMAIL_ID is set to 'SERVER_NAME'
|
|
|
return $_SERVER["SERVER_NAME"];
|
|
@@ -6042,7 +6042,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
|
|
}
|
|
|
$amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
|
|
|
if ($rounding == -1) {
|
|
|
- $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
|
|
+ $rounding = min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), $conf->global->MAIN_MAX_DECIMALS_TOT);
|
|
|
}
|
|
|
$nbdecimal = $rounding;
|
|
|
|
|
@@ -6236,9 +6236,9 @@ function price2num($amount, $rounding = '', $option = 0)
|
|
|
} elseif ($rounding == 'MS') {
|
|
|
$nbofdectoround = isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? $conf->global->MAIN_MAX_DECIMALS_STOCK : 5;
|
|
|
} elseif ($rounding == 'CU') {
|
|
|
- $nbofdectoround = max($conf->global->MAIN_MAX_DECIMALS_UNIT, 8); // TODO Use param of currency
|
|
|
+ $nbofdectoround = max(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), 8); // TODO Use param of currency
|
|
|
} elseif ($rounding == 'CT') {
|
|
|
- $nbofdectoround = max($conf->global->MAIN_MAX_DECIMALS_TOT, 8); // TODO Use param of currency
|
|
|
+ $nbofdectoround = max(getDolGlobalString('MAIN_MAX_DECIMALS_TOT'), 8); // TODO Use param of currency
|
|
|
} elseif (is_numeric($rounding)) {
|
|
|
$nbofdectoround = (int) $rounding;
|
|
|
}
|
|
@@ -6734,7 +6734,7 @@ function get_product_vat_for_country($idprod, $thirdpartytouse, $idprodfournpric
|
|
|
// '1.23'
|
|
|
// or '1.23 (CODE)'
|
|
|
$defaulttx = '';
|
|
|
- if ($conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS != 'none') {
|
|
|
+ if (getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS') != 'none') {
|
|
|
$defaulttx = $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
|
|
|
}
|
|
|
/*if (preg_match('/\((.*)\)/', $defaulttx, $reg)) {
|
|
@@ -10353,7 +10353,7 @@ function printCommonFooter($zone = 'private')
|
|
|
// Google Analytics
|
|
|
// TODO Add a hook here
|
|
|
if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AN_ID')) {
|
|
|
- $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
|
|
+ $tmptagarray = explode(',', getDolGlobalString('MAIN_GOOGLE_AN_ID'));
|
|
|
foreach ($tmptagarray as $tmptag) {
|
|
|
print "\n";
|
|
|
print "<!-- JS CODE TO ENABLE for google analtics tag -->\n";
|