From e2039d8774a588c915995942ed45346e47aec342 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Tue, 30 Dec 2025 17:33:18 +0100 Subject: [PATCH] Fix issue with VAT check --- include/XMLDocument/invoiceubl21.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/XMLDocument/invoiceubl21.class.php b/include/XMLDocument/invoiceubl21.class.php index 9abd51928..cc3ce03fd 100644 --- a/include/XMLDocument/invoiceubl21.class.php +++ b/include/XMLDocument/invoiceubl21.class.php @@ -137,7 +137,7 @@ class InvoiceUBL21 extends XMLInvoice { } } - if ( isset ($company['MY_TVA']) && preg_match('/([a-z][A-Z]){2}/',$company['MY_TVA']) == false ) + if ( isset ($company['MY_TVA']) && preg_match('/[a-z]{2}/i',$company['MY_TVA']) == false ) { $a_error[]="MY_TVA"; } @@ -175,7 +175,7 @@ class InvoiceUBL21 extends XMLInvoice { } } - if ( $this->data['customer']["customer_vat_id"] != "" && preg_match('/([a-z][A-Z]){2}/',$this->data['customer']["customer_vat_id"] ) == false) + if ( $this->data['customer']["customer_vat_id"] != "" && preg_match('/[a-z]{2}/i',$this->data['customer']["customer_vat_id"] ) == false) { $a_error[]='customer_vat_id';