From 13d64f10b9ab9c329ac3f6d4de5a83e5bd1bcdd0 Mon Sep 17 00:00:00 2001 From: "kilian (dks-laptop)" Date: Fri, 19 Mar 2021 13:45:22 +0100 Subject: [PATCH] v20210319 --- app/lib/POT/Report.php | 57 ++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/app/lib/POT/Report.php b/app/lib/POT/Report.php index 9ed41c4c..6c90a080 100644 --- a/app/lib/POT/Report.php +++ b/app/lib/POT/Report.php @@ -237,7 +237,7 @@ public function printPOTFooter($schema,$outfile){ $pdata = $this->getPeriodDays($schema,$data["id_staff"],$data["startdate"],$data["enddate"]); $wsums = $this->getPeriodWeekSums($schema,$data["id_staff"],$data["startdate"],$data["enddate"]); error_log(print_r($wsums,true)); - $pagehead = "

".$data["surname"]." ".$data["prename"]." ".(($data["matricule"] != "")?"(".$data["matricule"].")":"")."

"; + $pagehead = $data["surname"]." ".$data["prename"]." ".(($data["matricule"] != "")?"(".$data["matricule"].")":""); $tblhead = " @@ -254,30 +254,17 @@ public function printPOTFooter($schema,$outfile){ $cmonth = $pdata[$cdate]["cmonth"]; $cweek = $pdata[$cdate]["weekstart"]; - $dspmonth = '

'.date('F Y',strtotime($cdate)).'

'; - $txtpage = $pagehead.$dspmonth.$tblhead; + $dspmonth = date('F Y',strtotime($cdate)); + $txtpage = "

".$dspmonth." / ".$pagehead."

".$tblhead; foreach ($dateseries as $ds){ $cdate = $ds["daydate"]; - if ($cweek != $pdata[$cdate]["weekstart"]){ - $cweek = $pdata[$cdate]["weekstart"]; - //$wst = $pdata[$cdate]['weekstart']; - error_log("WST".$wst); - $txtpage .= " - - - - - - - - - "; - } + //error_log($cdate." -> ".$cweek." -> ".$pdata[$cdate]["weekstart"]." -> ".$pdata[$cdate]["dspweekshort"]); + if ($pdata[$cdate]["cmonth"] != $cmonth){ $cmonth = $pdata[$cdate]["cmonth"]; - $dspmonth = '

'.date('F Y',strtotime($cdate)).'

'; - $txtpage .= $tblfoot.$pagebreak.$pagehead.$dspmonth.$tblhead; + $dspmonth = date('F Y',strtotime($cdate)); + $txtpage .= $tblfoot.$pagebreak."

".$dspmonth." / ".$pagehead."

".$tblhead; } if ($pdata[$cdate]){ $txtpage .= " @@ -307,9 +294,37 @@ public function printPOTFooter($schema,$outfile){ "; } + if ($ds["weekday"] == "7"){ + //$cweek != $pdata[$cdate]["weekstart"] + + //$cweek = $pdata[$cdate]["weekstart"]; + $wst = $pdata[$cdate]['weekstart']; + //error_log("WST".$wst); + $txtpage .= " + + + + + + + + + "; + } } - + $wst = $pdata[$cdate]['weekstart']; + //error_log("WST".$wst); + $txtpage .= " + + + + + + + + + "; $txtpage .= $tblfoot; $txtpage .= "
"; -- 2.39.5
Date Heures de travail
".$pdata[$cdate]["dspweekshort"]."Totaux Semaine".$wsums[$wst]["vacancyhours"]."".$wsums[$wst]["vacillhours"]."".$wsums[$wst]["vacextrahours"]."".$wsums[$wst]["recuperationhours"]."".$wsums[$wst]["partunemplhours"]."".$wsums[$wst]["totalhours"]."
 
".$pdata[$cdate]["dspweekshort"]."Totaux Semaine".$wsums[$wst]["vacancyhours"]."".$wsums[$wst]["vacillhours"]."".$wsums[$wst]["vacextrahours"]."".$wsums[$wst]["recuperationhours"]."".$wsums[$wst]["partunemplhours"]."".$wsums[$wst]["totalhours"]."
".$pdata[$cdate]["dspweekshort"]."Totaux Semaine".$wsums[$wst]["vacancyhours"]."".$wsums[$wst]["vacillhours"]."".$wsums[$wst]["vacextrahours"]."".$wsums[$wst]["recuperationhours"]."".$wsums[$wst]["partunemplhours"]."".$wsums[$wst]["totalhours"]."