From 2fdd8486c948029a6ed25477e5f29b04761624cb Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Sat, 22 May 2021 06:13:16 +0200 Subject: [PATCH 1/3] No try to translate label field in dictionary for new --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index c9ada83ed15..2bd55c6c66a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2015,7 +2015,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; $transfound = 0; $transkey = ''; - if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label + if (in_array($fieldlist[$field], array('label', 'libelle')) and !empty($obj->code)) // For label { // Special case for labels if ($tabname == MAIN_DB_PREFIX.'c_civility') { From 56bb2bbd14e788b6f2cb643cd9506de6741124f7 Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Fri, 4 Jun 2021 17:10:26 +0200 Subject: [PATCH 2/3] On dict, test $obj->code if empty before translation --- htdocs/admin/dict.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 2bd55c6c66a..f0b6ab5ec2b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2015,13 +2015,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; $transfound = 0; $transkey = ''; - if (in_array($fieldlist[$field], array('label', 'libelle')) and !empty($obj->code)) // For label + if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label { // Special case for labels - if ($tabname == MAIN_DB_PREFIX.'c_civility') { + if ($tabname == MAIN_DB_PREFIX.'c_civility' && !empty($obj->code)) { $transkey = "Civility".strtoupper($obj->code); } - if ($tabname == MAIN_DB_PREFIX.'c_payment_term') { + if ($tabname == MAIN_DB_PREFIX.'c_payment_term' && !empty($obj->code)) { $langs->load("bills"); $transkey = "PaymentConditionShort".strtoupper($obj->code); } From 03cd88d145e0bafe3ea0799ea2530b18079c61b6 Mon Sep 17 00:00:00 2001 From: Alexis LAURIER Date: Thu, 10 Jun 2021 16:29:56 +0200 Subject: [PATCH 3/3] bugfix/supplierBankTransfertWrongCodeCheckMassAction --- htdocs/fourn/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 317def67098..904de663e78 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -323,7 +323,7 @@ if (empty($reshook)) if ($numprlv > 0) { $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); - } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE') { + } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'VIR') { $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); } else {