verify if Hierarchical Responsible is allowed to validate holiday/exp (#37315)
* verify if Hierarchical Responsible is allowed to validate holiday/expense * Add messages for holiday and expense report approval * Add French translations for approval messages
This commit is contained in:
parent
cea9183889
commit
f810a89977
3 changed files with 19 additions and 0 deletions
|
|
@ -163,3 +163,5 @@ TOTP=TOTP (Time-base One-Time Password)
|
|||
UserRemovedFromGroup=User removed from group
|
||||
UserSetInGroup=User set in group
|
||||
ColorGroup=Color of group
|
||||
NotHolidayApprover=Not allowed to approve holiday
|
||||
NotExpenseReportApprover=Not allowed to approve expense report
|
||||
|
|
|
|||
|
|
@ -163,3 +163,5 @@ TOTP=TOTP (mot de passe à usage unique basé sur le temps)
|
|||
UserRemovedFromGroup=utilisateur supprimé du groupe
|
||||
UserSetInGroup=utilisateur défini dans le groupe
|
||||
ColorGroup=Couleur du groupe
|
||||
NotHolidayApprover=N'est pas autorisé à valider des congés
|
||||
NotExpenseReportApprover=N'est pas autorisé à valider des notes de frais
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -420,6 +421,20 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
|||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
|
||||
}
|
||||
if (isModEnabled('holiday')) {
|
||||
$holidayapprover = new Holiday($db);
|
||||
$arrayApprover = $holidayapprover->fetch_users_approver_holiday();
|
||||
if (!in_array((string) $object->fk_user, $arrayApprover)) {
|
||||
print '<br><span class="opacitymedium">('.$langs->trans("NotHolidayApprover").')</span>';
|
||||
}
|
||||
}
|
||||
if (isModEnabled('expensereport')) {
|
||||
$expensereportapprover = new ExpenseReport($db);
|
||||
$arrayApprover = $expensereportapprover->fetch_users_approver_expensereport();
|
||||
if (!in_array((string) $object->fk_user, $arrayApprover)) {
|
||||
print '<br><span class="opacitymedium">('.$langs->trans("NotExpenseReportApprover").')</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
|
|
|||
Loading…
Reference in a new issue