Enhance exportThanatoStatistic method to include month and year parameters; refactor absence hour calculations for clarity
This commit is contained in:
parent
de431c0f95
commit
5cf18b50dc
@ -2599,7 +2599,7 @@ class PageController extends Controller {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function exportThanatoStatistic($thanatoIdsToExport){
|
public function exportThanatoStatistic($thanatoIdsToExport,$month,$year){
|
||||||
if(empty($thanatoIdsToExport)){
|
if(empty($thanatoIdsToExport)){
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,8 +160,8 @@ class ExportThanatoStatisticService {
|
|||||||
''.';'.
|
''.';'.
|
||||||
DateHelpers::getPublicHolidayText($leave['isPublicHoliday']).';'.
|
DateHelpers::getPublicHolidayText($leave['isPublicHoliday']).';'.
|
||||||
$leaveValue.';'.
|
$leaveValue.';'.
|
||||||
$diseaseValue.';'.
|
|
||||||
$restValue.';'.
|
$restValue.';'.
|
||||||
|
$diseaseValue.';'.
|
||||||
''.';'.
|
''.';'.
|
||||||
''.';'.
|
''.';'.
|
||||||
''.';'.
|
''.';'.
|
||||||
@ -203,7 +203,8 @@ class ExportThanatoStatisticService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$totalWorkedHours -= $totalLeaveHours - $totalRestHours - $totalDiseaseHours;
|
$totalAbsenceHours = $totalLeaveHours + $totalRestHours + $totalDiseaseHours;
|
||||||
|
$totalWorkedHours -= $totalAbsenceHours;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$routeLines = $this->gestionBdd->getRouteLinesByDevisIdList($devisData["devisId"]);
|
$routeLines = $this->gestionBdd->getRouteLinesByDevisIdList($devisData["devisId"]);
|
||||||
@ -233,7 +234,8 @@ class ExportThanatoStatisticService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$totalWorkedHours -= $totalLeaveHours - $totalRestHours - $totalDiseaseHours;
|
$totalAbsenceHours = $totalLeaveHours + $totalRestHours + $totalDiseaseHours;
|
||||||
|
$totalWorkedHours -= $totalAbsenceHours;
|
||||||
}
|
}
|
||||||
$fileContent = $this->populateLastRecapForTheLine(
|
$fileContent = $this->populateLastRecapForTheLine(
|
||||||
$fileContent,
|
$fileContent,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user