From 8e9bc7577e32c64ae7dd805ff69a175d63f6dac2 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 22 Jan 2026 06:18:07 +0100 Subject: [PATCH] Mistype UBL21BEL --- include/class/tva_rate_mtable.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class/tva_rate_mtable.class.php b/include/class/tva_rate_mtable.class.php index 0f9f3f15f..f985670d1 100644 --- a/include/class/tva_rate_mtable.class.php +++ b/include/class/tva_rate_mtable.class.php @@ -454,17 +454,17 @@ class Tva_Rate_MTable extends Manage_Table_SQL } // if vatex is set then code invoice must be different from S and Z - if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BE' && trim($this->table->vx_code??"") != "" && in_array($this->table->tva_peppol_code,['S','Z'] )) + if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BEL' && trim($this->table->vx_code??"") != "" && in_array($this->table->tva_peppol_code,['S','Z'] )) { $this->set_error("vx_code",_("Le code d'exemption TVA ne peut être utilisé avec ce code Facture électronique UBL ")); } // if vatex is set then code invoice must be different from S and Z - if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BE' && trim($this->table->vx_code??"") != "" && $this->table->tva_peppol_code=="") + if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BEL' && trim($this->table->vx_code??"") != "" && $this->table->tva_peppol_code=="") { $this->set_error("vx_code",_("Le code d'exemption TVA n' pas de sens sans code Facture électronique")); } // if tva_peppol_code is not S or Z then a VATEX code must be supplied - if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BE' + if ( $g_parameter->MY_INVOICE_FORMAT == 'UBL21BEL' && ! in_array($this->table->tva_peppol_code??"",["Z","S"]) && trim($this->table->vx_code??"" ) =="") {