Loading data/templates/timesheet_activity_synthesis.default.html.php +4 −4 Changes for data/templates/timesheet_activity_synthesis.default.html.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ $labels = [ $colonneAbs = count($othersGroups['abs']); $colonneAbsTotal = $colonneAbs > 1 ? 1 : 0; $colonneOthers = count($othersGroups['others']); $colonneOthers = count($othersGroups['other']); $colonneOthersTotal = $colonneOthers > 1 ? 1 : 0; $colonneOthers = count($othersGroups['education']); Loading @@ -81,8 +81,6 @@ $labels = [ $colspanLot = count($wps) -1 +1; $colspanCE = count($ces) -1; if( $colspanCE > 1 ) $colspanCE +=1; $colEDU = count() ?> <th class="research" colspan="<?= $colonneCategorieRecherche + $colonneCategorieRechercheTotal ?>">Recherches</th> Loading Loading @@ -197,8 +195,10 @@ $labels = [ <?= $this->duration($line['totalResearch']) ?> </td> <pre><?= print_r($line['othersGroups']['research'], true) ?></pre> <?php foreach ($line['othersGroups']['research'] as $dt): ?> <?php foreach ($dt['others'] as $other=>$duration): ?> <?php foreach ($dt['others'] as $duration): ?> <td class="ce research"> <?= $this->duration($duration) ?> </td> Loading data/templates/timesheet_person_month.default.html.php +1 −1 Changes for data/templates/timesheet_person_month.default.html.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -414,6 +414,6 @@ </tr> </tfoot> </table> <?php if( $outputFormat == 'html' ): ?> <?php if( isset($outputFormat) && $outputFormat == 'html' ): ?> <a href="?action=export2&out=pdf&period=<?= $datas['period'] ?>&personid=<?= $_REQUEST['personid'] ?>">Télécharger le PDF</a> <?php endif; ?> No newline at end of file module/Oscar/src/Oscar/Controller/TimesheetController.php +2 −5 Changes for module/Oscar/src/Oscar/Controller/TimesheetController.php: 2 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -537,19 +537,16 @@ class TimesheetController extends AbstractOscarController $output['format'] = 'pdf'; /** @var TimesheetActivityPeriodHtmlFormatter $formatter */ $formatter = $this->getServiceLocator()->get('TimesheetActivityPeriodPdfFormatter'); $html = $formatter->render($output); $formatter->render($output); die(); } elseif ($format == "html") { else { $output['format'] = 'html'; /** @var TimesheetActivityPeriodPdfFormatter $formatter */ $formatter = $this->getServiceLocator()->get('TimesheetActivityPeriodHtmlFormatter'); $html = $formatter->render($output); die($html); } else { return $output; } } Loading module/Oscar/src/Oscar/Service/TimesheetService.php +16 −3 Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 16 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -1291,6 +1291,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa // Total (hors ABS) 'totalWork' => 0.0, // Total Recherche (Workpackage + groupe 'research') 'totalResearch' => 0.0, 'comments' => [] ]; Loading Loading @@ -1389,7 +1392,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa 'others' => [], 'othersGroups' => [], 'totaux' => [ 'total' => 0.0 'total' => 0.0, 'totalWork' => 0.0, 'totalResearch' => 0.0 ], 'totalMain' => 0.0, 'totalProjects' => 0.0, Loading Loading @@ -1869,7 +1874,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $dayIndex = ($i % 7); $dayOfWeek = $dayIndex +1; $duration = $daysDetails['days'][$dayOfWeek]; $duration = array_key_exists($dayOfWeek, $daysDetails['days']) ? $daysDetails['days'][$dayOfWeek] : 0; $maxlength = $daysDetails['max']; $minlength = $daysDetails['min']; Loading Loading @@ -2820,11 +2825,19 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $daysInfos[intval($day)]['duration'] += $timesheet->getDuration(); $totalGroup[$groupFamily]['total'] += $timesheet->getDuration(); if(!array_key_exists($day, $totalGroup[$groupFamily]['days'])) $totalGroup[$groupFamily]['days'][$day] = 0.0; $totalGroup[$groupFamily]['days']["$day"] += $timesheet->getDuration(); $declarations[$path][$group]['subgroup'][$subGroup]['total'] += $timesheet->getDuration(); if(!array_key_exists($day, $declarations[$path][$group]['subgroup'][$subGroup]['days'])) $declarations[$path][$group]['subgroup'][$subGroup]['days'][$day] = 0.0; $declarations[$path][$group]['subgroup'][$subGroup]['days'][$day] += $timesheet->getDuration(); $declarations[$path][$group]['subgroup'][$subGroup]['days']['total'] += $timesheet->getDuration(); // $declarations[$path][$group]['subgroup'][$subGroup]['days']['total'] += $timesheet->getDuration(); $declarations[$path][$group]['total'] += $timesheet->getDuration(); $totalPeriod += $timesheet->getDuration(); } Loading Loading
data/templates/timesheet_activity_synthesis.default.html.php +4 −4 Changes for data/templates/timesheet_activity_synthesis.default.html.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ $labels = [ $colonneAbs = count($othersGroups['abs']); $colonneAbsTotal = $colonneAbs > 1 ? 1 : 0; $colonneOthers = count($othersGroups['others']); $colonneOthers = count($othersGroups['other']); $colonneOthersTotal = $colonneOthers > 1 ? 1 : 0; $colonneOthers = count($othersGroups['education']); Loading @@ -81,8 +81,6 @@ $labels = [ $colspanLot = count($wps) -1 +1; $colspanCE = count($ces) -1; if( $colspanCE > 1 ) $colspanCE +=1; $colEDU = count() ?> <th class="research" colspan="<?= $colonneCategorieRecherche + $colonneCategorieRechercheTotal ?>">Recherches</th> Loading Loading @@ -197,8 +195,10 @@ $labels = [ <?= $this->duration($line['totalResearch']) ?> </td> <pre><?= print_r($line['othersGroups']['research'], true) ?></pre> <?php foreach ($line['othersGroups']['research'] as $dt): ?> <?php foreach ($dt['others'] as $other=>$duration): ?> <?php foreach ($dt['others'] as $duration): ?> <td class="ce research"> <?= $this->duration($duration) ?> </td> Loading
data/templates/timesheet_person_month.default.html.php +1 −1 Changes for data/templates/timesheet_person_month.default.html.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -414,6 +414,6 @@ </tr> </tfoot> </table> <?php if( $outputFormat == 'html' ): ?> <?php if( isset($outputFormat) && $outputFormat == 'html' ): ?> <a href="?action=export2&out=pdf&period=<?= $datas['period'] ?>&personid=<?= $_REQUEST['personid'] ?>">Télécharger le PDF</a> <?php endif; ?> No newline at end of file
module/Oscar/src/Oscar/Controller/TimesheetController.php +2 −5 Changes for module/Oscar/src/Oscar/Controller/TimesheetController.php: 2 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -537,19 +537,16 @@ class TimesheetController extends AbstractOscarController $output['format'] = 'pdf'; /** @var TimesheetActivityPeriodHtmlFormatter $formatter */ $formatter = $this->getServiceLocator()->get('TimesheetActivityPeriodPdfFormatter'); $html = $formatter->render($output); $formatter->render($output); die(); } elseif ($format == "html") { else { $output['format'] = 'html'; /** @var TimesheetActivityPeriodPdfFormatter $formatter */ $formatter = $this->getServiceLocator()->get('TimesheetActivityPeriodHtmlFormatter'); $html = $formatter->render($output); die($html); } else { return $output; } } Loading
module/Oscar/src/Oscar/Service/TimesheetService.php +16 −3 Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 16 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -1291,6 +1291,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa // Total (hors ABS) 'totalWork' => 0.0, // Total Recherche (Workpackage + groupe 'research') 'totalResearch' => 0.0, 'comments' => [] ]; Loading Loading @@ -1389,7 +1392,9 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa 'others' => [], 'othersGroups' => [], 'totaux' => [ 'total' => 0.0 'total' => 0.0, 'totalWork' => 0.0, 'totalResearch' => 0.0 ], 'totalMain' => 0.0, 'totalProjects' => 0.0, Loading Loading @@ -1869,7 +1874,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $dayIndex = ($i % 7); $dayOfWeek = $dayIndex +1; $duration = $daysDetails['days'][$dayOfWeek]; $duration = array_key_exists($dayOfWeek, $daysDetails['days']) ? $daysDetails['days'][$dayOfWeek] : 0; $maxlength = $daysDetails['max']; $minlength = $daysDetails['min']; Loading Loading @@ -2820,11 +2825,19 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa $daysInfos[intval($day)]['duration'] += $timesheet->getDuration(); $totalGroup[$groupFamily]['total'] += $timesheet->getDuration(); if(!array_key_exists($day, $totalGroup[$groupFamily]['days'])) $totalGroup[$groupFamily]['days'][$day] = 0.0; $totalGroup[$groupFamily]['days']["$day"] += $timesheet->getDuration(); $declarations[$path][$group]['subgroup'][$subGroup]['total'] += $timesheet->getDuration(); if(!array_key_exists($day, $declarations[$path][$group]['subgroup'][$subGroup]['days'])) $declarations[$path][$group]['subgroup'][$subGroup]['days'][$day] = 0.0; $declarations[$path][$group]['subgroup'][$subGroup]['days'][$day] += $timesheet->getDuration(); $declarations[$path][$group]['subgroup'][$subGroup]['days']['total'] += $timesheet->getDuration(); // $declarations[$path][$group]['subgroup'][$subGroup]['days']['total'] += $timesheet->getDuration(); $declarations[$path][$group]['total'] += $timesheet->getDuration(); $totalPeriod += $timesheet->getDuration(); } Loading