From a5d7ef68245116b2feb3a9ddef3e73f503bb6b6f Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 23 Nov 2025 11:28:58 +0100 Subject: [PATCH] FacturX : PEPPOL ID not needed --- include/XMLDocument/facturx.class.php | 22 ++++++++++++++++++++-- include/compta_ven.inc.php | 5 +++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/include/XMLDocument/facturx.class.php b/include/XMLDocument/facturx.class.php index 4111796b0..6f66da593 100644 --- a/include/XMLDocument/facturx.class.php +++ b/include/XMLDocument/facturx.class.php @@ -91,7 +91,6 @@ class FacturX extends XMLInvoice ,ATTR_DEF_CITY=>'city' ,ATTR_DEF_COUNTRY_CODE=>'country' ,ATTR_DEF_NUMTVA=>'customer_vat_id' - ,ATTR_DEF_PEPPOLID=>'endpoint_id' ]; foreach ($a_needed as $item=>$value) { @@ -244,6 +243,25 @@ class FacturX extends XMLInvoice return $invoice->downloadString(); } - + /** + * @brief check that all the data are correct + * @returns empty arry : no errors, array with error code + * @see get_message_error + */ + public function verify() + { + // verify all VAT + ///@var $a_error : array of error_code see check_company_error + $a_error = array(); + $a_error['general'] = []; + $a_error['operation']=[]; + + // verify that all needed data in PARAMETER are valid + $a_error['company'] = $this->check_company_data(); + $a_error['customer'] = $this->check_customer_data(); + + return $a_error; + } + } \ No newline at end of file diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index d93b28d56..07ad55f1e 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -50,8 +50,9 @@ if ( isset($_REQUEST['p_jrn']) && NoAccess(); exit -1; } - +//------------------------------------------------ /* if a new invoice is encoded, we display a form for confirmation */ +//------------------------------------------------ if ( isset ($_POST['view_invoice'] ) ) { $p_jrn=$http->post("p_jrn","number"); @@ -115,10 +116,10 @@ if ( isset ($_POST['view_invoice'] ) ) return; } } + //------------------------------ /* Record the invoice */ //------------------------------ - if ( isset($_POST['record']) ) { // Check privilege