From 7e2eca661bd289ff76138c2fa6ed081b9133197f Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Tue, 18 Dec 2018 09:40:58 +0100 Subject: [PATCH 1/3] FIX: contact/adress tab: when changing company ajax combo, the first contact change is not taken into account --- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/class/html.formcompany.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bc9aa55f6f6..1dc334560ec 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1355,7 +1355,7 @@ class Form $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); } - if ($htmlname != 'none' || $options_only) $out.= ''; if ($showempty == 1) $out.= ''; if ($showempty == 2) $out.= ''; $num = $this->db->num_rows($resql); @@ -1417,7 +1417,7 @@ class Form { $out.= ''; } - if ($htmlname != 'none' || $options_only) + if ($htmlname != 'none' && ! $options_only) { $out.= ''; } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 63babef655e..317f5fe1af6 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -589,8 +589,8 @@ class FormCompany runJsCodeForEvent'.$htmlname.'(values); } }); - /* Clean contact */ - $("div#s2id_contactid>a>span").html(\'\'); + + $(this).trigger("blur"); }); // Function used to execute events when search_htmlname change From 96144e18f11db066333bec03cb2df4dd0576e0ac Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Tue, 18 Dec 2018 15:27:32 +0100 Subject: [PATCH 2/3] FIX : Function updatePrice with wrong parameters --- htdocs/product/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 259f7d24c0a..a56ae34fc84 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1440,7 +1440,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ // Il doit au moins y avoir la ligne de prix initial. // On l'ajoute donc pour remettre a niveau (pb vieilles versions) - $object->updatePrice($object->price, $object->price_base_type, $user, $newprice_min); + $object->updatePrice($object->price, $object->price_base_type, $user, $object->tva_tx, $object->price_min); $result = $db->query($sql); $num = $db->num_rows($result); From 09ce84ca93ba746cc12c7f50dad5f9b48ad331d0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 21 Dec 2018 16:38:02 +0100 Subject: [PATCH 3/3] FIX avoid Class 'AdherentType' not found --- .../triggers/interface_50_modLdap_Ldapsynchro.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 1e9c2c2ec31..500f6bfa966 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -436,9 +436,10 @@ class InterfaceLdapsynchro extends DolibarrTriggers // For member type if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') { - $membertype=new AdherentType($this->db); if ($object->typeid > 0) { + require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"; + $membertype=new AdherentType($this->db); $membertype->fetch($object->typeid); $membertype->listMembersForMemberType(); @@ -555,6 +556,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers // For member type if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') { + require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"; + /* * Change member info */ @@ -679,6 +682,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers { if ($object->typeid > 0) { + require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"; + /* * Remove member in member type */