Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-02-08 14:59:07 +01:00
commit f333fb3b7d

View File

@ -334,7 +334,7 @@ if ($action == 'confirm_send')
$object->fetch($id); $object->fetch($id);
// Si brouillon et créateur // Si brouillon et créateur
if($object->statut == Holiday::STATUS_DRAFT && $cancreate) if ($object->statut == Holiday::STATUS_DRAFT && $cancreate)
{ {
$object->oldcopy = dol_clone($object); $object->oldcopy = dol_clone($object);
@ -379,7 +379,7 @@ if ($action == 'confirm_send')
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
// Si l'option pour avertir le valideur en cas de délai trop court // Si l'option pour avertir le valideur en cas de délai trop court
if($object->getConfCP('AlertValidatorDelay')) if ($object->getConfCP('AlertValidatorDelay'))
{ {
if($object->date_debut < $nextMonth) if($object->date_debut < $nextMonth)
{ {
@ -479,7 +479,10 @@ if ($action == 'confirm_valid')
$error++; $error++;
setEventMessages(null, $object->errors, 'errors'); setEventMessages(null, $object->errors, 'errors');
} }
}
if (! $error)
{
// To // To
$destinataire = new User($db); $destinataire = new User($db);
$destinataire->fetch($object->fk_user); $destinataire->fetch($object->fk_user);