NEW Report a list of leave requests for a month

This commit is contained in:
Laurent Destailleur 2018-03-20 13:42:29 +01:00
parent 1fdad9182f
commit 67483eeb64
6 changed files with 14 additions and 3 deletions

View File

@ -1377,6 +1377,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=4&leftmenu=hrm", $langs->trans("CancelCP"), 2, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="hrm") $newmenu->add("/holiday/list.php?select_statut=5&leftmenu=hrm", $langs->trans("RefuseCP"), 2, $user->rights->holiday->read);
$newmenu->add("/holiday/define_holiday.php?action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read);
$newmenu->add("/holiday/month_report.php", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->read);
$newmenu->add("/holiday/view_log.php?action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday);
}

View File

@ -1071,6 +1071,7 @@ else
print '<table class="border centpercent">';
print '<tbody>';
// User
print '<tr>';
print '<td class="titlefield">'.$langs->trans("User").'</td>';
print '<td>';
@ -1133,6 +1134,7 @@ else
print '</td>';
print '</tr>';
}
// Nb of days
print '<tr>';
print '<td>'.$langs->trans('NbUseDaysCP').'</td>';
print '<td>'.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'</td>';

View File

@ -50,7 +50,7 @@ class Holiday extends CommonObject
var $date_fin=''; // Date end in PHP server TZ
var $date_debut_gmt=''; // Date start in GMT
var $date_fin_gmt=''; // Date end in GMT
var $halfday='';
var $halfday=''; // 0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning
var $statut=''; // 1=draft, 2=validated, 3=approved
var $fk_validator;
var $date_valid='';

View File

@ -490,7 +490,7 @@ print_liste_field_titre("DateCreateCP",$_SERVER["PHP_SELF"],"cp.date_create","",
print_liste_field_titre("Employee",$_SERVER["PHP_SELF"],"cp.fk_user","",$param,'',$sortfield,$sortorder);
print_liste_field_titre("ValidatorCP",$_SERVER["PHP_SELF"],"cp.fk_validator","",$param,'',$sortfield,$sortorder);
print_liste_field_titre("Type",$_SERVER["PHP_SELF"],'','',$param,'',$sortfield,$sortorder);
print_liste_field_titre("Duration",$_SERVER["PHP_SELF"],'','',$pram,'align="right"',$sortfield,$sortorder);
print_liste_field_titre("NbUseDaysCPShort",$_SERVER["PHP_SELF"],'','',$pram,'align="right"',$sortfield,$sortorder);
print_liste_field_titre("DateDebCP",$_SERVER["PHP_SELF"],"cp.date_debut","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre("DateFinCP",$_SERVER["PHP_SELF"],"cp.date_fin","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"cp.statut","",$param,'align="right"',$sortfield,$sortorder);
@ -536,7 +536,7 @@ if (! empty($holiday->holiday))
print '<tr class="oddeven">';
print '<td>';
print $holidaystatic->getNomUrl(1);
print $holidaystatic->getNomUrl(1, 1);
print '</td>';
print '<td style="text-align: center;">'.dol_print_date($date,'day').'</td>';
print '<td>'.$userstatic->getNomUrl(-1, 'leave').'</td>';

View File

@ -39,6 +39,10 @@ TypeOfLeaveId=Type of leave ID
TypeOfLeaveCode=Type of leave code
TypeOfLeaveLabel=Type of leave label
NbUseDaysCP=Number of days of vacation consumed
NbUseDaysCPShort=Days consumed
NbUseDaysCPShortInMonth=Days consumed in month
DateStartInMonth=Start date in month
DateEndInMonth=End date in month
EditCP=Edit
DeleteCP=Delete
ActionRefuseCP=Refuse

View File

@ -31,6 +31,10 @@ InfosWorkflowCP=Informations du workflow
RequestByCP=Demandée par
TitreRequestCP=Demande de congés
NbUseDaysCP=Nombre de jours de congés consommés
NbUseDaysCPShort=Jours consommés
NbUseDaysCPShortInMonth=Jours consommés dans le mois
DateStartInMonth=Start date in month
DateEndInMonth=End date in month
EditCP=Modifier
DeleteCP=Supprimer
ActionRefuseCP=Refuser