Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0

Conflicts:
	htdocs/core/class/extrafields.class.php
	htdocs/fichinter/card.php
	htdocs/fourn/commande/dispatch.php
This commit is contained in:
Laurent Destailleur 2017-01-20 21:02:05 +01:00
commit fc4aa96cd7
5 changed files with 17 additions and 15 deletions

View File

@ -771,7 +771,7 @@ class ExtraFields
}
elseif ($type == 'varchar')
{
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keysuffix.'options_'.$key.$keyprefix.'" maxlength="'.$size.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keysuffix.'options_'.$key.$keyprefix.'" maxlength="'.$size.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
}
elseif (in_array($type, array('mail', 'phone', 'url')))
{

View File

@ -595,7 +595,7 @@ if (empty($reshook))
}
}
// Classify Billed
// Classify unbilled
else if ($action == 'classifyunbilled' && $user->rights->ficheinter->creer)
{
$result=$object->setStatut(1);
@ -610,19 +610,19 @@ if (empty($reshook))
}
}
// Classify Billed
// Classify Done
else if ($action == 'classifydone' && $user->rights->ficheinter->creer)
{
$result=$object->setStatut(3);
if ($result > 0)
{
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
exit;
}
else
{
setEventMessages($object->error, $object->errors, 'errors');
}
$result=$object->setStatut(3);
if ($result > 0)
{
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
exit;
}
else
{
setEventMessages($object->error, $object->errors, 'errors');
}
}
/*

View File

@ -368,7 +368,7 @@ if ($id > 0 || ! empty($ref)) {
print "</td></tr>";
if ($object->methode_commande) {
print '<tr><td>' . $langs->trans("Method") . '</td><td>' . $object->methode_commande . '</td></tr>';
print '<tr><td>' . $langs->trans("Method") . '</td><td>' . $commande->getInputMethod() . '</td></tr>';
}
}

View File

@ -129,6 +129,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND sc.fk_soc = f.fk_soc";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if (! empty($conf->global->AGENT_CONTACT_TYPE))

View File

@ -1061,7 +1061,8 @@ class User extends CommonObject
$this->town = $contact->town;
$this->state_id = $contact->state_id;
$this->country_id = $contact->country_id;
$this->employee = 0;
if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4));
$this->login = $login;