From 1eba744e8be7e1c307cc107860d238600ace9433 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 20 Oct 2014 13:15:48 +0200 Subject: [PATCH 1/3] Add hook method to simply display child lines in order/invoice/propal --- htdocs/core/class/commonobject.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9996337736a..e7cf4dbb7ee 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2566,6 +2566,11 @@ abstract class CommonObject $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected, 'extrafieldsline'=>$extrafieldsline); $reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } + else + { + $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected, 'extrafieldsline'=>$extrafieldsline); + $reshook=$hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + } } else { From c103a5927a9596cb34747556789b26d9c2854314 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Mon, 20 Oct 2014 22:28:08 +0200 Subject: [PATCH 2/3] Update commondocgenerator.class.php add : outstanding limit on ODT fix : only public note are display on ODT (private stay private) --- htdocs/core/class/commondocgenerator.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index a16b0cb16b6..d1048acbc23 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -118,8 +118,9 @@ abstract class CommonDocGenerator 'mycompany_idprof5'=>$mysoc->idprof5, 'mycompany_idprof6'=>$mysoc->idprof6, 'mycompany_vatnumber'=>$mysoc->tva_intra, + 'outstanding_limit'=>$mysoc->outstanding_limit, // Only private not exists for "mysoc" - 'mycompany_note'=>$mysoc->note_private + 'mycompany_note'=>$mysoc->note_public //'mycompany_note_private'=>$mysoc->note_private, //'mycompany_note_public'=>$mysoc->note_public, ); From 10f419e372102a7033f589c8f8c9190782f496bc Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Thu, 23 Oct 2014 13:08:39 +0200 Subject: [PATCH 3/3] error on adding fields (bad function --- htdocs/core/class/commondocgenerator.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index d1048acbc23..26f209ed107 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -118,11 +118,9 @@ abstract class CommonDocGenerator 'mycompany_idprof5'=>$mysoc->idprof5, 'mycompany_idprof6'=>$mysoc->idprof6, 'mycompany_vatnumber'=>$mysoc->tva_intra, - 'outstanding_limit'=>$mysoc->outstanding_limit, - // Only private not exists for "mysoc" - 'mycompany_note'=>$mysoc->note_public - //'mycompany_note_private'=>$mysoc->note_private, - //'mycompany_note_public'=>$mysoc->note_public, + // Only private not exists for "mysoc" + 'mycompany_note_private'=>$mysoc->note_private, + ); } @@ -167,6 +165,7 @@ abstract class CommonDocGenerator 'company_customeraccountancycode'=>$object->code_compta, 'company_supplieraccountancycode'=>$object->code_compta_fournisseur, 'company_juridicalstatus'=>$object->forme_juridique, + 'company_outstanding_limit'=>$object->outstanding_limit, 'company_capital'=>$object->capital, 'company_idprof1'=>$object->idprof1, 'company_idprof2'=>$object->idprof2,