diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index c9ada83ed15..f0b6ab5ec2b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2018,10 +2018,10 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') 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); } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 792fb91f980..83e87e9b0f6 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 {