diff --git a/include/XMLDocument/invoiceubl21.class.php b/include/XMLDocument/invoiceubl21.class.php index dca7c1a00..33259119d 100644 --- a/include/XMLDocument/invoiceubl21.class.php +++ b/include/XMLDocument/invoiceubl21.class.php @@ -196,7 +196,7 @@ class InvoiceUBL21 extends XMLInvoice { $customer=$this->createElement('cac:AccountingCustomerParty'); $customer_party=$customer->appendChild($this->createElement('cac:Party')); - list($scheme_id,$peppol)=explode( ":",$this->data['customer']['endpoint_id']); + list($scheme_id,$peppol)=explode( ":",trim($this->data['customer']['endpoint_id'])); $customer_party->appendChild($this->createElement('cbc:EndpointID',$peppol)) ->setAttribute('schemeID', $scheme_id); @@ -277,7 +277,7 @@ class InvoiceUBL21 extends XMLInvoice { $supplier=$this->createElement('cac:AccountingSupplierParty'); $supplier_party=$supplier->appendChild($this->createElement('cac:Party')); - list($scheme_id,$peppol)=explode( ":",$company['COMPANY_PEPPOL_ID']); + list($scheme_id,$peppol)=explode( ":",trim($company['COMPANY_PEPPOL_ID'])); $supplier_party->appendChild($this->createElement('cbc:EndpointID',$peppol)) ->setAttribute('schemeID', $scheme_id); diff --git a/include/XMLDocument/xmlinvoice.class.php b/include/XMLDocument/xmlinvoice.class.php index 8c87f4687..9bfe5d10c 100644 --- a/include/XMLDocument/xmlinvoice.class.php +++ b/include/XMLDocument/xmlinvoice.class.php @@ -194,7 +194,7 @@ abstract class XMLInvoice extends \DOMDocument for ($e=0;$e<$nb_note;$e++) { - $result['note'].= html_entity_decode($a_note[$e]['n_text']); + $result['note'].= html_entity_decode($a_note[$e]['n_text']??""); } // goods and services $result['operation']=array();