UBL21: check invalid PEPPOL ID
This commit is contained in:
parent
9347b18fa9
commit
b090355ef3
1 changed files with 2 additions and 10 deletions
|
|
@ -162,18 +162,10 @@ class InvoiceUBL21 extends XMLInvoice {
|
|||
$a_error[]=$value;
|
||||
}
|
||||
}
|
||||
if ( $this->data['customer']["endpoint_id"] != "")
|
||||
// check if peppol id has the form 9999:9999...
|
||||
if (preg_match('/[0-9]+:[[:alnum:]]+/',$this->data['customer']["endpoint_id"]) == 0)
|
||||
{
|
||||
// check if peppol id has the form 9999:9999...
|
||||
list($scheme_id,$peppol)=explode(":", $this->data['customer'][$value]);
|
||||
if (preg_replace('/[0-9]/', '', $scheme_id) != "")
|
||||
{
|
||||
$a_error[]='endpoint_id';
|
||||
}elseif(\noalyss_trim($peppol) =="")
|
||||
{
|
||||
$a_error[]='endpoint_id';
|
||||
|
||||
}
|
||||
}
|
||||
if ( $this->data['customer']["customer_vat_id"] != "" && preg_match('/[a-z]{2}/i',$this->data['customer']["customer_vat_id"] ) == false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue