Merge pull request #22095 from Hystepik/develop#2

Fix : Yogosha report 12245 bad field verification
This commit is contained in:
Laurent Destailleur 2022-09-07 13:11:26 +02:00 committed by GitHub
commit f38408e57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -254,6 +254,12 @@ if (empty($reshook)) {
$error++;
}
$approverslist = $object->fetch_users_approver_holiday();
if (!in_array($approverid, $approverslist)) {
setEventMessages($langs->transnoentitiesnoconv('InvalidValidator'), null, 'errors');
$error++;
}
$result = 0;
if (!$error) {

View File

@ -58,6 +58,7 @@ ConfirmDeleteCP=Confirm the deletion of this leave request?
ErrorCantDeleteCP=Error you don't have the right to delete this leave request.
CantCreateCP=You don't have the right to make leave requests.
InvalidValidatorCP=You must choose the approver for your leave request.
InvalidValidator=The user chosen isn't an approver.
NoDateDebut=You must select a start date.
NoDateFin=You must select an end date.
ErrorDureeCP=Your leave request does not contain working day.