diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 4ea4306a465..d2117f426ca 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -2129,6 +2129,7 @@ if (empty($reshook)) {
$date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
$date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
+ $tva_npr = "";
// Define special_code for special lines
$special_code = 0;
@@ -2157,8 +2158,7 @@ if (empty($reshook)) {
//$tva_tx = $datapriceofproduct['tva_tx'];
//$tva_npr = $datapriceofproduct['tva_npr'];
-
- $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
+ $tmpvat = (float) price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx));
// Set unit price to use
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index c4ec203eb97..ae2209acacc 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -406,7 +406,7 @@ if ($object->id > 0) {
print '';
print $object->getLibType();
print '';
- if ($object->module_source) {
+ if (!empty($object->module_source)) {
print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')';
}
if ($object->type == $object::TYPE_REPLACEMENT) {
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index 207bbca63b3..c0d7f64a264 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -365,11 +365,11 @@ class Stripe extends CommonObject
$stripeamount = $amount;
}
- $fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE;
- if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
- $fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL;
- } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
- $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
+ $fee = $amount * (getDolGlobalString("STRIPE_APPLICATION_FEE_PERCENT", '0') / 100) + getDolGlobalString("STRIPE_APPLICATION_FEE", '0');
+ if ($fee >= getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') && getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') > getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
+ $fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0');
+ } elseif ($fee < getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
+ $fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0');
}
if (!in_array($currency_code, $arrayzerounitcurrency)) {
$stripefee = round($fee * 100);