diff --git a/htdocs/.gitignore b/htdocs/.gitignore index bf0c3b10ffa..bf6a1487ea6 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -19,4 +19,5 @@ /dolimed* /allscreens* /ecommerce/ -/cabinetmed* \ No newline at end of file +/cabinetmed* +/conf/conf.php \ No newline at end of file diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index afd5c1a05d4..c64e89b342f 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -130,10 +130,15 @@ elseif($action == 'add_event') $add_holiday = $holiday->getValueEventCp($event); $new_holiday = $nb_holiday + $add_holiday; - // On ajoute la modification dans le LOG - $holiday->addLogCP($user->id,$userCP, $holiday->getNameEventCp($event),$new_holiday); + // add event to existing types of vacation + foreach ($typeleaves as $key => $leave) { + $vacationTypeID = $leave['rowid']; - $holiday->updateSoldeCP($userCP,$new_holiday); + // On ajoute la modification dans le LOG + $holiday->addLogCP($user->id,$userCP, $holiday->getNameEventCp($event),$new_holiday, $vacationTypeID); + + $holiday->updateSoldeCP($userCP,$new_holiday, $vacationTypeID); + } setEventMessages('AddEventToUserOkCP', '', 'mesgs'); }