Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0

Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/product/price.php
This commit is contained in:
Laurent Destailleur 2018-12-22 18:59:49 +01:00
commit 8d39edf430
4 changed files with 11 additions and 6 deletions

View File

@ -1364,7 +1364,7 @@ class Form
$out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
} }
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>'; if ($htmlname != 'none' && ! $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>';
if ($showempty == 1 || ($showempty == 3 && $num > 1)) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>&nbsp;</option>'; if ($showempty == 1 || ($showempty == 3 && $num > 1)) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>&nbsp;</option>';
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>'; if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
@ -1428,7 +1428,7 @@ class Form
$out.= ($socid != -1) ? ($langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined")) : $langs->trans('SelectAThirdPartyFirst'); $out.= ($socid != -1) ? ($langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined")) : $langs->trans('SelectAThirdPartyFirst');
$out.= '</option>'; $out.= '</option>';
} }
if ($htmlname != 'none' || $options_only) if ($htmlname != 'none' && ! $options_only)
{ {
$out.= '</select>'; $out.= '</select>';
} }

View File

@ -601,8 +601,8 @@ class FormCompany
runJsCodeForEvent'.$htmlname.'(values); runJsCodeForEvent'.$htmlname.'(values);
} }
}); });
/* Clean contact */
$("div#s2id_contactid>a>span").html(\'\'); $(this).trigger("blur");
}); });
// Function used to execute events when search_htmlname change // Function used to execute events when search_htmlname change

View File

@ -437,9 +437,10 @@ class InterfaceLdapsynchro extends DolibarrTriggers
// For member type // For member type
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') 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) 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->fetch($object->typeid);
$membertype->listMembersForMemberType('', 1); $membertype->listMembersForMemberType('', 1);
@ -556,6 +557,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
// For member type // For member type
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') 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 * Change member info
*/ */
@ -680,6 +683,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
{ {
if ($object->typeid > 0) if ($object->typeid > 0)
{ {
require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php";
/* /*
* Remove member in member type * Remove member in member type
*/ */

View File

@ -1442,7 +1442,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
// Il doit au moins y avoir la ligne de prix initial. // Il doit au moins y avoir la ligne de prix initial.
// On l'ajoute donc pour remettre a niveau (pb vieilles versions) // 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);
if (! empty($conf->global->PRODUIT_MULTIPRICES)) { if (! empty($conf->global->PRODUIT_MULTIPRICES)) {
$object->updatePrice($object->multiprices[1], $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1])?0:$object->multiprices_tva_tx[1]), $object->multiprices_min[1], 1); $object->updatePrice($object->multiprices[1], $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1])?0:$object->multiprices_tva_tx[1]), $object->multiprices_min[1], 1);
} else { } else {