diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index cb7ce67d923..10c2c906e04 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -784,7 +784,7 @@ abstract class CommonInvoice extends CommonObject if (!$error) { // Force payment mode of invoice to withdraw - $payment_mode_id = dol_getIdFromCode($this->db, 'PRE', 'c_paiement', 'code', 'id', 1); + $payment_mode_id = dol_getIdFromCode($this->db, ($type == 'bank-transfer' ? 'VIR' : 'PRE'), 'c_paiement', 'code', 'id', 1); if ($payment_mode_id > 0) { $result = $this->setPaymentMethods($payment_mode_id); diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index de32e84d43a..c90eb80dee7 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -645,6 +645,7 @@ class ImportCsv extends ModeleImports $errorforthistable++; $error++; } + else $newval = $arrayrecord[($key - 1)]['val']; //We get new value computed. } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'numeric') { diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 35aee35869e..f19bf5302ff 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -672,6 +672,7 @@ class ImportXlsx extends ModeleImports $errorforthistable++; $error++; } + else $newval = $arrayrecord[($key - 1)]['val']; //We get new value computed. } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'numeric') {