diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index edfea0d278c..12c48775d7f 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -658,9 +658,9 @@ class FormMail extends Form
continue;
}
if (is_array($val)) $val = implode(', ', $val); // key __MULTICURRENCY_CODE__ is an array and crashes dolGetFirstLineOfText function which accept only text
- $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag(dolGetFirstLineOfText($val))).'
';
- $helpforsubstitution .= '';
+ $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag(dolGetFirstLineOfText((string) $val))).'
';
}
+ $helpforsubstitution .= '';
}
/*
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 8c68f4f7c48..96c74f8d3ca 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -3485,6 +3485,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
if ($fuser->hasRight('fournisseur', 'facture', $lire) || preg_match('/^specimen/i', $original_file)) {
$accessallowed = 1;
}
+ $original_file = preg_replace("/payment\//", "", $original_file); // Because the $conf->fournisseur->payment->dir_output already contains the "payment/"
$original_file = $conf->fournisseur->payment->dir_output.'/'.$original_file;
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."paiementfournisseur WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
} elseif ($modulepart == 'payment') {
diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php
index 3571167be9e..678831556ad 100644
--- a/htdocs/core/lib/price.lib.php
+++ b/htdocs/core/lib/price.lib.php
@@ -294,7 +294,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
}
//dol_syslog("price.lib::calcul_price_total $qty, $pu, $remise_percent_ligne, $txtva, $price_base_type $info_bits");
- if ($price_base_type == 'HT') {
+ if ($price_base_type != 'TTC') {
// We work to define prices using the price without tax
$result[6] = price2num($tot_sans_remise, 'MT');
$result[8] = price2num($tot_sans_remise * (1 + ((($info_bits & 1) ? 0 : $txtva) / 100)) + $localtaxes[0], 'MT'); // Selon TVA NPR ou non
@@ -386,7 +386,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
// If rounding is not using base 10 (rare)
if (getDolGlobalString('MAIN_ROUNDING_RULE_TOT')) {
- if ($price_base_type == 'HT') {
+ if ($price_base_type != 'TTC') {
$result[0] = price2num(round((float) $result[0] / getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 0) * getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 'MT');
$result[1] = price2num(round((float) $result[1] / getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 0) * getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 'MT');
$result[9] = price2num(round((float) $result[9] / getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 0) * getDolGlobalFloat('MAIN_ROUNDING_RULE_TOT'), 'MT');
diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php
index 22cc0e91436..8d7e318dce8 100644
--- a/htdocs/fourn/paiement/card.php
+++ b/htdocs/fourn/paiement/card.php
@@ -31,13 +31,6 @@
// Load Dolibarr environment
require '../../main.inc.php';
-require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
-require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
-require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
-
-
/**
* @var Conf $conf
* @var DoliDB $db
@@ -45,6 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
* @var Translate $langs
* @var User $user
*/
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
// Load translation files required by the page
$langs->loadLangs(array('banks', 'bills', 'companies', 'suppliers'));
@@ -195,8 +193,9 @@ if ($result > 0) {
$linkback = ''.$langs->trans("BackToList").'';
+ $morehtmlref = '';
- dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref');
+ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
print '