fix : display if error

This commit is contained in:
florian HENRY 2018-08-06 11:28:34 +02:00
parent 0d85eb52c5
commit 74d05da149

View File

@ -452,10 +452,15 @@ if ($action == 'confirm_valid')
$newSolde = $soldeActuel - ($nbopenedday * $object->getConfCP('nbHolidayDeducted'));
// On ajoute la modification dans le LOG
$object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type);
$result=$object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type);
if ($result<0) {
setEventMessages(null, $object->errors,'errors');
}
// Mise à jour du solde
$object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type);
$result=$object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type);
if ($result<0) {
setEventMessages(null, $object->errors,'errors');
}
// To
$destinataire = new User($db);