diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php
index 38ec91ff143..61737ab00f3 100644
--- a/htdocs/core/class/html.formmargin.class.php
+++ b/htdocs/core/class/html.formmargin.class.php
@@ -108,7 +108,7 @@ class FormMargin
// calcul des marges
if (isset($line->fk_remise_except) && isset($conf->global->MARGIN_METHODE_FOR_DISCOUNT)) { // remise
- if ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '1') { // remise globale considérée comme produit
+ if (getDolGlobalString('MARGIN_METHODE_FOR_DISCOUNT') == '1') { // remise globale considérée comme produit
$marginInfos['pa_products'] += $pa;
$marginInfos['pv_products'] += $pv;
$marginInfos['pa_total'] += $pa;
@@ -120,7 +120,7 @@ class FormMargin
//}
//else
$marginInfos['margin_on_products'] += $pv - $pa;
- } elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '2') { // remise globale considérée comme service
+ } elseif (getDolGlobalString('MARGIN_METHODE_FOR_DISCOUNT') == '2') { // remise globale considérée comme service
$marginInfos['pa_services'] += $pa;
$marginInfos['pv_services'] += $pv;
$marginInfos['pa_total'] += $pa;
@@ -130,7 +130,7 @@ class FormMargin
// $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa);
//else
$marginInfos['margin_on_services'] += $pv - $pa;
- } elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '3') { // remise globale prise en compte uniqt sur total
+ } elseif (getDolGlobalString('MARGIN_METHODE_FOR_DISCOUNT') == '3') { // remise globale prise en compte uniqt sur total
$marginInfos['pa_total'] += $pa;
$marginInfos['pv_total'] += $pv;
}
diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php
index bd49b6afbe4..f11f8aea918 100644
--- a/htdocs/public/opensurvey/studs.php
+++ b/htdocs/public/opensurvey/studs.php
@@ -116,9 +116,9 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo
if (GETPOST('nom', 'alphanohtml')) {
$nouveauchoix = '';
for ($i = 0; $i < $nbcolonnes; $i++) {
- if (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '1') {
+ if (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '1') {
$nouveauchoix .= "1";
- } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') {
+ } elseif (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '2') {
$nouveauchoix .= "2";
} else {
$nouveauchoix .= "0";