From 0029d787cd5f57ba45a2ebe2c02e3af77d7329ba Mon Sep 17 00:00:00 2001 From: sparkyx Date: Mon, 19 Jan 2026 16:23:29 +0100 Subject: [PATCH] Fix Bug : order and communication not set in XML UBL21 --- include/XMLDocument/xmlinvoice.class.php | 2 +- include/compta_ven.inc.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/XMLDocument/xmlinvoice.class.php b/include/XMLDocument/xmlinvoice.class.php index 52244fc32..d681f6c71 100644 --- a/include/XMLDocument/xmlinvoice.class.php +++ b/include/XMLDocument/xmlinvoice.class.php @@ -257,7 +257,7 @@ abstract class XMLInvoice extends \DOMDocument } } - $result['info']['communication']=($result['info']['communication']=="")?$result['id']:""; + $result['info']['communication']=($result['info']['communication']=="")?$result['id']:$result['info']['communication']; $result['document']=$this->fill_document($jr_id); /** diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index b052e04c8..024052918 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -158,6 +158,10 @@ if ( isset($_POST['record']) ) $Ledger=new Acc_Ledger_Sale($cn,$post_jrn); try { $internal=$Ledger->insert($_POST); + + /* Save the additional information into jrn_info */ + $obj=new Acc_Ledger_Info($cn); + $obj->save_extra($Ledger->jr_id,$_POST); $Ledger->upload_supplemental_document($Ledger->jr_id); // var $receipt (string) contains the name of the file name of // the invoice (document created), if empty there @@ -290,9 +294,6 @@ if ( isset($_POST['record']) ) } - /* Save the additional information into jrn_info */ - $obj=new Acc_Ledger_Info($cn); - $obj->save_extra($Ledger->jr_id,$_POST); /* save followup */ $Ledger->save_followup($http->request("action_gestion","string",""));