From b100cdb9db97e20eb2b5a9a13951eb9e74c64902 Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Fri, 19 Jul 2019 11:58:21 +0200 Subject: [PATCH 1/2] FIX: extrafield loading bug due to assumption that an object is a third party while it may be a contact if MAIN_USE_COMPANY_NAME_OF_CONTACT is set. --- .../expedition/doc/doc_generic_shipment_odt.modules.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 9c45c135ac3..a1be784f249 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -393,7 +393,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } } // Make substitutions into odt of thirdparty - $tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs); + if ($socobject->element == 'contact') { + $tmparray = $this->get_substitutionarray_contact($socobject, $outputlangs); + } else { + $tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs); + } foreach($tmparray as $key=>$value) { try { From cd7d3f1a368a4d2c84906c3ba1110961a72cdc3e Mon Sep 17 00:00:00 2001 From: gauthier Date: Fri, 19 Jul 2019 15:41:44 +0200 Subject: [PATCH 2/2] FIX : search by phone pro --- htdocs/contact/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 5aacbc2f16f..f786e73d17a 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -290,7 +290,7 @@ if ($search_firstname) $sql.= natural_search('p.firstname', $search if ($search_societe) $sql.= natural_search('s.nom', $search_societe); if (strlen($search_poste)) $sql.= natural_search('p.poste', $search_poste); if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso); -if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone); +if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone_pro); if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile); if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);