white-space: pre;
}
+span[class^="rowicon"]::after {
+ content: "\A";
+ white-space: nowrap;
+}
+
a.inlinebtn {
to_char(sum(coalesce(pd.vacancyhours,'00:00:00'::time)), 'HH24:MI'::text) as vacancynormal,
to_char(sum(coalesce(pd.vacillhours,'00:00:00'::time)), 'HH24:MI'::text) as vacancyill,
to_char(sum(coalesce(pd.vacextrahours,'00:00:00'::time)), 'HH24:MI'::text) as vacancyextra,
- to_char(sum(coalesce(pd.partunemplhours,'00:00:00'::time)), 'HH24:MI'::text) as partunemplhours,
+ to_char(sum(coalesce(pd.otherpaidhours,'00:00:00'::time)), 'HH24:MI'::text) as otherpaidhours,
to_char(sum(coalesce(pd.recuperationhours,'00:00:00'::time)), 'HH24:MI'::text) as recuperationhours,sgr.groupname
from ".$schema.".staffreportperioddays pd
join (
to_char(srp.vacancyill, 'HH24:MI'::text) AS vacancyill,
to_char(srp.vacancynormal, 'HH24:MI'::text) AS vacancynormal,
to_char(srp.vacancyextra, 'HH24:MI'::text) AS vacancyextra,
- to_char(srp.partunemplhours, 'HH24:MI'::text) AS partunemplhours,
+ to_char(srp.otherpaidhours, 'HH24:MI'::text) AS otherpaidhours,
to_char(srp.recuperationhours, 'HH24:MI'::text) AS recuperationhours,
case when position('-' in to_char(srp.hoursdiff, 'HH24:MI')) > 0 then '-' || replace(to_char(srp.hoursdiff, 'HH24:MI'),'-','') else to_char(srp.hoursdiff, 'HH24:MI') end as hoursdiff,
to_char(srp.totalhours, 'HH24:MI'::text) AS totalhours,
,to_char(ws.vacancyhours,'HH24:MI') as vacancynormal
,to_char(ws.vacillhours,'HH24:MI') as vacancyill
,to_char(ws.vacextrahours,'HH24:MI') as vacancyextra
- ,to_char(ws.partunemplhours,'HH24:MI') as partunemplhours
+ ,to_char(ws.otherpaidhours,'HH24:MI') as otherpaidhours
,to_char(ws.recuperationhours,'HH24:MI') as recuperationhours
,to_char(ws.totalhours,'HH24:MI') as totalhours
,cd.contractworkdays
sum(CASE WHEN srpd.vacillhours IS NULL THEN '00:00:00'::interval ELSE srpd.vacillhours::interval END) AS vacillhours,
sum(CASE WHEN srpd.vacextrahours IS NULL THEN '00:00:00'::interval ELSE srpd.vacextrahours::interval END) AS vacextrahours,
sum(CASE WHEN srpd.recuperationhours IS NULL THEN '00:00:00'::interval ELSE srpd.recuperationhours::interval END) AS recuperationhours,
- sum(CASE WHEN srpd.partunemplhours IS NULL THEN '00:00:00'::interval ELSE srpd.partunemplhours::interval END) AS partunemplhours,
+ sum(CASE WHEN srpd.otherpaidhours IS NULL THEN '00:00:00'::interval ELSE srpd.otherpaidhours::interval END) AS otherpaidhours,
sum(CASE WHEN srpd.dayhours IS NULL THEN '00:00:00'::interval ELSE srpd.dayhours::interval END) AS totalhours,
- sum(CASE WHEN srpd.workhours > '00:00:00'::time without time zone OR srpd.recuperationhours > '00:00:00'::time without time zone OR srpd.vacancyhours > '00:00:00'::time without time zone OR srpd.vacillhours > '00:00:00'::time without time zone OR srpd.vacextrahours > '00:00:00'::time without time zone OR srpd.partunemplhours > '00:00:00'::time without time zone THEN 1 ELSE 0 END) AS workdays,
+ sum(CASE WHEN srpd.workhours > '00:00:00'::time without time zone OR srpd.recuperationhours > '00:00:00'::time without time zone OR srpd.vacancyhours > '00:00:00'::time without time zone OR srpd.vacillhours > '00:00:00'::time without time zone OR srpd.vacextrahours > '00:00:00'::time without time zone OR srpd.otherpaidhours > '00:00:00'::time without time zone THEN 1 ELSE 0 END) AS workdays,
sum( CASE WHEN srpd.contracthours IS NULL THEN '00:00:00'::interval ELSE srpd.contracthours::interval END) AS contracthours
FROM (select *,date(date_trunc('week', daydate)) AS weekstart,
date(date_trunc('week', daydate) + interval '6 days') AS weekend,
function getPeriodDays($schema,$id_staff,$date_start,$date_end){
$sql = "SELECT pd.id,pd.id_staff,pd.id_reportperiod,pd.daydate,pd.payedpause,pd.daytype,
- vacancycomment,vacillcomment,vacextracomment,recupcomment,partunempcomment,
+ vacancycomment,vacillcomment,vacextracomment,recupcomment,otherpaidhourscomment,
date(date_trunc('week',pd.daydate)) as weekstart,
to_char(pd.timestart1::interval, 'HH24:MI') AS timestart1,
to_char(pd.timeend1::interval, 'HH24:MI') AS timeend1,
to_char(CASE WHEN pd.vacancyhours::interval = '00:00:00'::interval THEN NULL ELSE pd.vacancyhours END::interval, 'HH24:MI') AS vacancyhours,
to_char(CASE WHEN pd.vacillhours::interval = '00:00:00'::interval THEN NULL ELSE pd.vacillhours END::interval, 'HH24:MI') AS vacillhours,
to_char(CASE WHEN pd.vacextrahours::interval = '00:00:00'::interval THEN NULL ELSE pd.vacextrahours END::interval, 'HH24:MI') AS vacextrahours,
- to_char(CASE WHEN pd.partunemplhours::interval = '00:00:00'::interval THEN NULL ELSE pd.partunemplhours END::interval, 'HH24:MI') AS partunemplhours,
+ to_char(CASE WHEN pd.otherpaidhours::interval = '00:00:00'::interval THEN NULL ELSE pd.otherpaidhours END::interval, 'HH24:MI') AS otherpaidhours,
to_char(pd.contracthours::interval, 'HH24:MI') AS contracthours,
to_char(CASE WHEN pd.workhours::interval = '00:00:00'::interval THEN NULL ELSE pd.workhours END::interval, 'HH24:MI') AS workhours,
//case when payedpause is null then (preds.dt1+preds.dt2) else (preds.dt1+preds.dt2)-(preds.pdt1+preds.pdt2) end as worktime,
$sql = "update ".$schema.".staffreportperioddays spds set
workhours=ds.worktime, timepause=case when ds.timepause::interval > '00:00:00' then ds.timepause else null end,
- dayhours=(ds.worktime::interval + ds.vachours::interval + ds.vacillhours::interval + ds.vacextrahours::interval + ds.partunemplhours::interval + ds.recup::interval )::interval, interruptionhours = ds.interruption ,
- contracthours=case when ds.worktime::interval + ds.vachours::interval + ds.vacillhours::interval + ds.vacextrahours::interval + ds.partunemplhours::interval + ds.recup::interval > '00:00:00'::interval then ds.wdcontracthours else null end
+ dayhours=(ds.worktime::interval + ds.vachours::interval + ds.vacillhours::interval + ds.vacextrahours::interval + ds.otherpaidhours::interval + ds.recup::interval )::interval, interruptionhours = ds.interruption ,
+ contracthours=case when ds.worktime::interval + ds.vachours::interval + ds.vacillhours::interval + ds.vacextrahours::interval + ds.otherpaidhours::interval + ds.recup::interval > '00:00:00'::interval then ds.wdcontracthours else null end
from (
select preds.id,case when preds.recuperationhours is null then '00:00:00'::interval else preds.recuperationhours::interval end as recup,
case when preds.vacancyhours is null then '00:00:00'::time else preds.vacancyhours end as vachours,
case when preds.vacillhours is null then '00:00:00'::time else preds.vacillhours end as vacillhours,
case when preds.vacextrahours is null then '00:00:00'::time else preds.vacextrahours end as vacextrahours,
- case when preds.partunemplhours is null then '00:00:00'::time else preds.partunemplhours end as partunemplhours,
+ case when preds.otherpaidhours is null then '00:00:00'::time else preds.otherpaidhours end as otherpaidhours,
preds.interruption,
(preds.dt1+preds.dt2)-(case when preds.payedpause is null then preds.pdt1+preds.pdt2 else '00:00:00'::interval end) as worktime,
(preds.pdt1+preds.pdt2) as timepause,
wdcontracthours
- from ( select id, recuperationhours,vacancyhours,vacillhours,vacextrahours,partunemplhours,payedpause,
+ from ( select id, recuperationhours,vacancyhours,vacillhours,vacextrahours,otherpaidhours,payedpause,
case when timestart1 is not null and timeend1 is not null then case when timeend1 < timestart1 then '24:00:00'::interval + timeend1 - timestart1 else timeend1 - timestart1 end else '00:00:00'::interval end as dt1,
case when timestart2 is not null and timeend2 is not null then case when timeend2 < timestart2 then '24:00:00'::interval + timeend2 - timestart2 else timeend2 - timestart2 end else '00:00:00'::interval end as dt2,
case when pausestart1 is not null and pauseend1 is not null then case when pauseend1 < pausestart1 then '24:00:00'::interval + pauseend1 - pausestart1 else pauseend1 - pausestart1 end else '00:00:00'::interval end as pdt1,
vacancyill=csp.vacillhours,
vacancynormal=csp.vacancynormal,
vacancyextra=csp.vacextrahours,
- partunemplhours=csp.partunemplhours,
+ otherpaidhours=csp.otherpaidhours,
totalhours=csp.totalhours,
recuperationhours=csp.recuperationhours,";
//if ((defined($statussuncount) && $staffprdprev["prevperiod"] != '')){
$sql .= "avgtotalweekhours=".(($whavg["avgtotalhours"] == "")?'null':"'".$whavg["avgtotalhours"]."'::interval").",";
$sql .= "hoursdiff=csp.diffhours
FROM (
- select contracthours,workhours,totalhours,recuperationhours, totalhours-contracthours-transferedhours as diffhours,id,vacillhours,vacancynormal,vacextrahours,partunemplhours from (
+ select contracthours,workhours,totalhours,recuperationhours, totalhours-contracthours-transferedhours as diffhours,id,vacillhours,vacancynormal,vacextrahours,otherpaidhours from (
select dp.id,
sum(pd.workhours) as workhours,
sum(pd.dayhours) as totalhours,
sum(coalesce(pd.vacancyhours,'00:00:00'::time)) as vacancynormal,
sum(coalesce(pd.vacillhours,'00:00:00'::time)) as vacillhours,
sum(coalesce(pd.vacextrahours,'00:00:00'::time)) as vacextrahours,
- sum(coalesce(pd.partunemplhours,'00:00:00'::time)) as partunemplhours,
+ sum(coalesce(pd.otherpaidhours,'00:00:00'::time)) as otherpaidhours,
sum(coalesce(pd.recuperationhours,'00:00:00'::time)) as recuperationhours,
coalesce(dp.contracthours,'00:00:00'::interval) as contracthours,
coalesce(dp.payedhours0,'00:00:00'::interval) as payedhours0,
vacancyhours=".$this->dbh->value($copy["vacancyhours"]).",
vacillhours=".$this->dbh->value($copy["vacillhours"]).",
vacextrahours=".$this->dbh->value($copy["vacextrahours"]).",
- partunemplhours=".$this->dbh->value($copy["partunemplhours"]).",
+ otherpaidhours=".$this->dbh->value($copy["otherpaidhours"]).",
recuperationhours=".$this->dbh->value($copy["recuperationhours"])."
where id in ('".join("','",$pasteids)."');";
$sql = preg_replace('/\s+/g',' ',$sql);
vacancyhours = null,
vacillhours = null,
vacextrahours = null,
- partunemplhours = null,
+ otherpaidhours = null,
recuperationhours = null,
workhours=null,
dayhours=null
$copy = $this->dbh->queryarray("select * from ".$schema.".workplandays where id_workplan='".$id_workplan."';");
//print Dumper($copy);
foreach ($copy as $c){
- $this->dbh->exec("update ".$schema.".staffreportperioddays set timestart1=".$this->dbh->value($copy[$c]["start1"]).",timeend1=".$this->dbh->value($copy[$c]["end1"]).",timestart2=".$this->dbh->value($copy[$c]["start2"]).",timeend2=".$this->dbh->value($copy[$c]["end2"]).", timepause=".$this->dbh->value($copy[$c]["pause"]).",
- pausestart1=".$this->dbh->value($copy[$c]["pausestart1"]).",pauseend1=".$this->dbh->value($copy[$c]["pauseend1"]).",pausestart2=".$this->dbh->value($copy[$c]["pausestart2"]).",pauseend2=".$this->dbh->value($copy[$c]["pauseend2"])." where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$copy[$c]["weekday"]."';");
+ $this->dbh->exec("update ".$schema.".staffreportperioddays set timestart1=".$this->dbh->value($c["start1"]).",timeend1=".$this->dbh->value($c["end1"]).",timestart2=".$this->dbh->value($c["start2"]).",timeend2=".$this->dbh->value($c["end2"]).", timepause=".$this->dbh->value($c["pause"]).",
+ pausestart1=".$this->dbh->value($c["pausestart1"]).",pauseend1=".$this->dbh->value($c["pauseend1"]).",pausestart2=".$this->dbh->value($c["pausestart2"]).",pauseend2=".$this->dbh->value($c["pauseend2"])." where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$c["weekday"]."';");
if ($keepvac != "1"){
$this->dbh->exec("update ".$schema.".staffreportperioddays set vacancyhours=null,vacillhours=null,vacextrahours=null
- where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$copy[$c]["weekday"]."';");
+ where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$c["weekday"]."';");
}
if ($keeprec != "1"){
$this->dbh->exec("update ".$schema.".staffreportperioddays set recuperationhours=null,id_recuperationtype=null
- where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$copy[$c]["weekday"]."';");
+ where id in ('".join("','",$replaceids)."') and date_part('isodow',daydate)::INT4='".$c["weekday"]."';");
}
}
//$this->setStaffPeriodDays($schema,$id_reportperiod,$id_staff);
- #dircopy($self->{tmplpath}.'/'.$template,$this->cfg["tmppath"].'/'.$template);
+ //dircopy($self->{tmplpath}.'/'.$template,$this->cfg["tmppath"].'/'.$template);
if (file_exists($this->cfg["tmppath"].$tmpfile.'.html')){
$cmd = '"'.$this->cfg["toolspath"]."/bin/wkhtmltopdf".'"';
if ($this->report[$template]["bottom"]){ $cmd .= " -B ".$this->report[$template]["bottom"]; }
$cmd .= ' "'.$this->cfg["tmppath"].'/'.$tmpfile.'.html"';
$cmd .= ' "'.$pdfname.'"';
error_log($cmd);
- #print STDERR $cmd."\n";
+ //print STDERR $cmd."\n";
$r = system($cmd);
}
if (file_exists($pdfname)){
// $self->printContent($schema,$this->cfg["tmppath"].'/'.$template.$$.".html",$inputdata);
// $self->printHeader($schema,$this->cfg["tmppath"].'/'.$template.$$.".header.html");
// $self->printFooter($schema,$this->cfg["tmppath"].'/'.$template.$$.".footer.html");
-// #dircopy($self->{tmplpath}.'/'.$template,$this->cfg["tmppath"].'/'.$template);
+// //dircopy($self->{tmplpath}.'/'.$template,$this->cfg["tmppath"].'/'.$template);
// if ((-e $this->cfg["tmppath"].'/'.$template.$$.'.html')){
// $cmd = '"'.$self->{pdf}->{app}.'"';
// if ($pdfreports->{$template}->{bottom}){ $cmd .= " -B ".$pdfreports->{$template}->{bottom}; }
// }
// $cmd .= ' "'.$this->cfg["tmppath"].'/'.$template.$$.'.html"';
// $cmd .= ' "'.$output.'"';
-// #print STDERR $cmd."\n";
+// //print STDERR $cmd."\n";
// $r = system($cmd);
// }
// if (-e $output){
-// #unlink($this->cfg["tmppath"].'/'.$template.$$.'.html');
+// //unlink($this->cfg["tmppath"].'/'.$template.$$.'.html');
// unlink($this->cfg["tmppath"].'/'.$template.$$.'.header.html');
// unlink($this->cfg["tmppath"].'/'.$template.$$.'.footer.html');
// return ($r,$output);
td { text-align: center;vertical-align: top; border: 1px solid black; }
.right{ text-align: right; }
table.tbinline { border-collapse: collapse; }
- /*table.tbinline td { border: 0.5px solid #969696; }*/
+ /*table.tbinline td { border: 0.5px solid //969696; }*/
table.tbinline tr:first-child td { border-top: 0; }
table.tbinline tr td:first-child { border-left: 0; }
table.tbinline tr:last-child td { border-bottom: 0; }
$rpdata =$this->dbh->queryarray($sql);
$rpmax = count($rpdata)-1;
foreach ($rpdata as $rd){
- $outdata .= $self->ReportPage($schema,$rpdata[$rd]);
+ $outdata .= $this->ReportPage($schema,$rpdata[$rd]);
if ($rd != $rpmax){
$outdata .= "<div class=\"page-break\"></div>";
}
<thead>
<tr ><th colspan=\"4\" style=\"border-right: 0px;font-size: 10pt;\">".$data["dspstartdate"]." - ".$data["dspenddate"]."</th><th colspan=\"3\" style=\"border-left: 0px;font-size: 10pt;\">".(($data["staffnumber"] != "")?"".$data["staffnumber"]."":"")." ".$data["surname"]." ".$data["prename"]." ".(($data["matricule"] != "")?"(".$data["matricule"].")":"")."</th></tr>
<tr>
- <!--<th style=\"background-color: #e6e6e6;\">Semaine</th>-->
- <th style=\"background-color: #e6e6e6;\">Lundi</th>
- <th style=\"background-color: #e6e6e6;\">Mardi</th>
- <th style=\"background-color: #e6e6e6;\">Mecredi</th>
- <th style=\"background-color: #e6e6e6;\">Jeudi</th>
- <th style=\"background-color: #e6e6e6;\">Vendredi</th>
- <th style=\"background-color: #e6e6e6;\">Samedi</th>
- <th style=\"background-color: #e6e6e6;\">Dimanche</th>
- <!--<th style=\"background-color: #e6e6e6;\">Totaux</th>-->
+ <!--<th style=\"background-color: //e6e6e6;\">Semaine</th>-->
+ <th style=\"background-color: //e6e6e6;\">Lundi</th>
+ <th style=\"background-color: //e6e6e6;\">Mardi</th>
+ <th style=\"background-color: //e6e6e6;\">Mecredi</th>
+ <th style=\"background-color: //e6e6e6;\">Jeudi</th>
+ <th style=\"background-color: //e6e6e6;\">Vendredi</th>
+ <th style=\"background-color: //e6e6e6;\">Samedi</th>
+ <th style=\"background-color: //e6e6e6;\">Dimanche</th>
+ <!--<th style=\"background-color: //e6e6e6;\">Totaux</th>-->
</tr>
</thead>
<tbody>";
$txtpage = $tblheader;
- #$pdays = $self->getPeriodDays($schema,$data["startdate"],$data["enddate"]);
+ //$pdays = $this->getPeriodDays($schema,$data["startdate"],$data["enddate"]);
$wdk = 0;
$lastpw = -1;
$numweeks = count($weeksums);
$cntr = 0;
foreach ($perioddata as $pw){
- $wd = explode(',',','.$perioddata[$pw]["weekdates"]);
- #print STDERR "CWEEKDAY:".$perioddata[$pw]["daydate"]."=>".$wd[$wdk]."\n";
+ $wd = explode(',',','.$pw["weekdates"]);
+ //print STDERR "CWEEKDAY:".$pw["daydate"]."=>".$wd[$wdk]."\n";
if ($wdk == 0 ){
if ($cntr > 6){
$txtpage .= "<div class=\"page-break\"></div>";
$cntr = 0;
}
$cntr++;
- $dspwd = explode(',',$perioddata[$pw]["dspweekdates"]);
+ $dspwd = explode(',',$pw["dspweekdates"]);
$txtpage .="<tr>
- <!--<th rowspan=\"2\" style=\"background-color: #e6e6e6;\">".$perioddata[$pw]["dspweekshort"]."</th>-->
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[0]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[1]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[2]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[3]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[4]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[5]."</th>
- <th style=\"width: 44mm;background-color: #e6e6e6;\">".$dspwd[6]."</th>
- <!--<th style=\"background-color: #e6e6e6;\"> </th></tr><tr>-->
+ <!--<th rowspan=\"2\" style=\"background-color: //e6e6e6;\">".$pw["dspweekshort"]."</th>-->
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[0]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[1]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[2]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[3]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[4]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[5]."</th>
+ <th style=\"width: 44mm;background-color: //e6e6e6;\">".$dspwd[6]."</th>
+ <!--<th style=\"background-color: //e6e6e6;\"> </th></tr><tr>-->
";
$wdk = 1;
}
- #print STDERR "CWEEKDAY:".$perioddata[$pw]["daydate"]."=>".$wd[$wdk]."\n";
- while (($perioddata[$pw]["daydate"] != $wd[$wdk]) && $wdk <= "7"){
+ //print STDERR "CWEEKDAY:".$pw["daydate"]."=>".$wd[$wdk]."\n";
+ while (($pw["daydate"] != $wd[$wdk]) && $wdk <= "7"){
if ($wdk == 0){$wdk++; next; }
- if (($perioddata[$pw]["daydate"] >= $data["startdate"]) || ($perioddata[$pw]["daydate"] <= $data["enddate"])){
- $txtpage .="<td style=\"max-height: 15px!important;height: 15mm;background-color: #d6d6d6;\"> </td>";
+ if (($pw["daydate"] >= $data["startdate"]) || ($pw["daydate"] <= $data["enddate"])){
+ $txtpage .="<td style=\"max-height: 15px!important;height: 15mm;background-color: //d6d6d6;\"> </td>";
}
$wdk++;
}
- #print STDERR "CWEEKDAY2:".$perioddata[$pw]["daydate"]."=>".$wd[$wdk]."\n";
+ //print STDERR "CWEEKDAY2:".$pw["daydate"]."=>".$wd[$wdk]."\n";
if ($wdk <= "7"){
- if ($perioddata[$pw]["dayhours"] != ""){
+ if ($pw["dayhours"] != ""){
$txtpage .= "<td style=\"max-height: 15px!important; height: 15mm;\">
<table class=\"tbinline\" style=\"height: 15mm;\" style=\"border: 0px;\"><tr style=\"border: 0px;\"><td style=\"border: 0px;\">
<table class=\"tbinline\">
- <tr style=\" border-bottom: 0.5px solid #969696;\" >
- <td class=\"datavalues\" style=\"height: 8mm;border-right: 0.5px solid #969696;\"><div>".$perioddata[$pw]["dspworkdata"]."</div></td>
+ <tr style=\" border-bottom: 0.5px solid //969696;\" >
+ <td class=\"datavalues\" style=\"height: 8mm;border-right: 0.5px solid //969696;\"><div>".$pw["dspworkdata"]."</div></td>
</tr>
- <tr style=\"border-right: 0.5px solid #969696;\">
- <td class=\"datavalues\" style=\"height: 7mm;border-right: 0.5px solid #969696;\">
- <div style=\"font-size: 6pt;\">".(($perioddata[$pw]["dsppausedata"])?$perioddata[$pw]["dsppausedata"]:" ")."</div>
+ <tr style=\"border-right: 0.5px solid //969696;\">
+ <td class=\"datavalues\" style=\"height: 7mm;border-right: 0.5px solid //969696;\">
+ <div style=\"font-size: 6pt;\">".(($pw["dsppausedata"])?$pw["dsppausedata"]:" ")."</div>
</td>
</tr>
</table>
</td><td style=\"width: 15mm;border: 0px; \">
<table class=\"tbinline\" style=\"border: 0px;\">
<tr>
- <td class=\"datavalues\" style=\"height: 5mm;border-bottom: 0.5px solid #969696;border-right: 0;\"\">
- ".(($perioddata[$pw]["dayhours"])?"<div style=\"font-weight: bold;\">".$perioddata[$pw]["dayhours"]."</div>":" ")."
+ <td class=\"datavalues\" style=\"height: 5mm;border-bottom: 0.5px solid //969696;border-right: 0;\"\">
+ ".(($pw["dayhours"])?"<div style=\"font-weight: bold;\">".$pw["dayhours"]."</div>":" ")."
</td>
</tr>
<tr>
- <td class=\"datavalues\" style=\"height: 5mm;border-bottom: 0.5px solid #969696;border-right: 0;\">
- ".(($perioddata[$pw]["vacancyhours"])?"<div style=\"font-style: bold;\">".$perioddata[$pw]["vacancyhours"]." <sup>".$self->{legend}->{vacancy}->{$perioddata[$pw]["id_vacancytype"]}->{legend}.")</sup></div>":" ")."
+ <td class=\"datavalues\" style=\"height: 5mm;border-bottom: 0.5px solid //969696;border-right: 0;\">
+ ".(($pw["vacancyhours"])?"<div style=\"font-style: bold;\">".$pw["vacancyhours"]." <sup>".$this["legend"]["vacancy"][$pw["id_vacancytype"]][legend].")</sup></div>":" ")."
</td>
</tr>
<tr>
<td class=\"datavalues\" style=\"height: 5mm;border-right: 0;\">
- ".(($perioddata[$pw]["recuperationhours"])?"<div style=\"text-decoration: bold;\">".$perioddata[$pw]["recuperationhours"]." <sup>".$self->{legend}->{recup}->{$perioddata[$pw]["id_recuperationtype"]}->{legend}.")</sup></div>":" ")."
+ ".(($pw["recuperationhours"])?"<div style=\"text-decoration: bold;\">".$pw["recuperationhours"]." <sup>".$this["legend"]["vacancy"][$pw["id_recuperationtype"]][legend].")</sup></div>":" ")."
</td>
</tr>
</table>
</td></tr></table>
</td>";
} else {
- #print STDERR "ELSE:".$perioddata[$pw]["dayhours"]."\n";
+ //print STDERR "ELSE:".$pw["dayhours"]."\n";
$txtpage .= "<td style=\"max-height: 15px!important; height: 15mm;\">jour de repos</td>";
}
}
$wdk++;
$lastpw = $pw;
- #print STDERR "Weekday:".$wdk."<=".$perioddata[$pw]["daydate"]."\n";
+ //print STDERR "Weekday:".$wdk."<=".$pw["daydate"]."\n";
if ($wdk >= "7"){
$txtpage .= "<td class=\"datavalues\">
<table class=\"tbinline\"><tr><td class=\"datavalues\">";
- $ws = $perioddata[$pw]["weekstart"];
+ $ws = $pw["weekstart"];
if (isset($weeksums[$ws])){
$txtpage .= "
<table class=\"tbinline\">
<tr>
<td class=\"datavalues\" style=\"height: 5mm;\">
- <div style=\"font-weight: bold;border-bottom: 0.5px solid #969696;\">".$weeksums[$ws]["totalhours"]."</div>
+ <div style=\"font-weight: bold;border-bottom: 0.5px solid //969696;\">".$weeksums[$ws]["totalhours"]."</div>
</td>
</tr>
</table>
";
- #<div style=\"font-weight: bold;text-decoration: underline;text-decoration-style: double;border-bottom: 0.5px solid #969696;\">".(($weeksums->{$ws}->{diffhours} =="00:00")?"":$weeksums->{$ws}->{diffhours})."</div>
+ //<div style=\"font-weight: bold;text-decoration: underline;text-decoration-style: double;border-bottom: 0.5px solid //969696;\">".(($weeksums->{$ws}->{diffhours} =="00:00")?"":$weeksums->{$ws}->{diffhours})."</div>
}
$txtpage .= "</td></tr></table>
</td></tr>
$wdk=0;
}
}
- #print STDERR "WDK: ".$wdk."\n";
+ //print STDERR "WDK: ".$wdk."\n";
if ($wdk >= "0"){
while ($wdk <= "7"){
- $txtpage .="<td style=\"height: 15mm;background-color: #d6d6d6;\"> </td>";
+ $txtpage .="<td style=\"height: 15mm;background-color: //d6d6d6;\"> </td>";
$wdk++;
}
if ($wdk >= "7"){
<table class=\"tbinline\">
<tr>
<td class=\"datavalues\" style=\"height: 5mm;\">
- <div style=\"font-weight: bold;border-bottom: 0.5px solid #969696;\">".$weeksums[$ws]["totalhours"]."</div>
+ <div style=\"font-weight: bold;border-bottom: 0.5px solid //969696;\">".$weeksums[$ws]["totalhours"]."</div>
</td>
</tr>
</table>
";
- # <tr>
- # <td class=\"datavalues\" style=\"height: 5mm;\">
- # <div style=\"font-weight: bold;text-decoration: underline;border-bottom: 0.5px solid #969696;\">".(($weeksums->{$ws}->{recperationhours} =="00:00")?"":$weeksums->{$ws}->{recperationhours})."</div>
- # </td>
- # </tr>
- # <tr>
- # <td class=\"datavalues\" style=\"height: 5mm;\">
- # <div style=\"font-weight: bold;font-style: italic;border-bottom: 0.5px solid #969696;\">".(($weeksums->{$ws}->{vacancyhours} =="00:00")?"":$weeksums->{$ws}->{vacancyhours})."</div>
- # </td>
- # </tr>
- #<div style=\"font-weight: bold;text-decoration: underline;text-decoration-style: double;border-bottom: 0.5px solid #969696;\">".(($weeksums->{$ws}->{diffhours} =="00:00")?"":$weeksums->{$ws}->{diffhours})."</div>
+ // <tr>
+ // <td class=\"datavalues\" style=\"height: 5mm;\">
+ // <div style=\"font-weight: bold;text-decoration: underline;border-bottom: 0.5px solid //969696;\">".(($weeksums->{$ws}->{recperationhours} =="00:00")?"":$weeksums->{$ws}->{recperationhours})."</div>
+ // </td>
+ // </tr>
+ // <tr>
+ // <td class=\"datavalues\" style=\"height: 5mm;\">
+ // <div style=\"font-weight: bold;font-style: italic;border-bottom: 0.5px solid //969696;\">".(($weeksums->{$ws}->{vacancyhours} =="00:00")?"":$weeksums->{$ws}->{vacancyhours})."</div>
+ // </td>
+ // </tr>
+ //<div style=\"font-weight: bold;text-decoration: underline;text-decoration-style: double;border-bottom: 0.5px solid //969696;\">".(($weeksums->{$ws}->{diffhours} =="00:00")?"":$weeksums->{$ws}->{diffhours})."</div>
}
$txtpage .= "</td></tr></table>
</td></tr>
$txtpage .= "</tbody> </table>";
- # $spt = $data["sums"];
+ // $spt = $data["sums"];
$txtpage .= "<table>
<thead>
<tr><th colspan=\"20\">Résumée période de référence: ".$data["dspstartdate"]." - ".$data["dspenddate"]."</th></tr>
<tr>
- <td style=\"text-align: right;background-color: #e6e6e6;\">heures contractuelles:<br/>heures travaillées:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">heures contractuelles:<br/>heures travaillées:</td>
<th style=\"width: 15mm;\">".$data["contracthours"]."<br/>".$data["workhours"]."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">congé maladie:<br>congé:<br>congé except.:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">congé maladie:<br>congé:<br>congé except.:</td>
<th style=\"width: 15mm;\">".(($data["vacancyill"] != '')?$data["vacancyill"] :"00:00")."<br>".(($data["vacancynormal"] != '')?$data["vacancynormal"] :"00:00")."<br>".(($data["vacancyextra"] != '')?$data["vacancyextra"] :"00:00")."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">heures<br/>récupérées:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">heures<br/>récupérées:</td>
<th style=\"width: 15mm;\">".$data["recuperationhours"]."<br/> </th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">durée travail<br/>réel prestée:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">durée travail<br/>réel prestée:</td>
<th style=\"width: 15mm;\">".$data["totalhours"]."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">moyenne durée<br/>travail réel:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">moyenne durée<br/>travail réel:</td>
<th style=\"width: 15mm;\">".$data["avgtotalweekhours"]."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">décompte reporté:<br/>heures payées:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">décompte reporté:<br/>heures payées:</td>
<th style=\"width: 15mm;\">".(($data["transferedhourscalc"] != '')?$data["transferedhourscalc"]:"00:00")."<br/>".(($data["payedhours"] != '')?$data["payedhours"]:"00:00")."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">décompte<br/>fin POT:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">décompte<br/>fin POT:</td>
<th style=\"width: 15mm;\">".$data["hoursdiff"]."</th>
- <td style=\"text-align: right;background-color: #e6e6e6;\">congé suppl. +44h:<br/>congé suppl. dimache travaillé:</td>
+ <td style=\"text-align: right;background-color: //e6e6e6;\">congé suppl. +44h:<br/>congé suppl. dimache travaillé:</td>
<th style=\"width: 15mm;\">".(($data["suppvacancy44hours"] != '')?$data["suppvacancy44hours"]:" ")."<br/>".(($data["suppvacancysunwork"] != '')?$data["suppvacancysunwork"]:" ")."</th>
</tr>
</thead>
JOIN ".$schema.".staff st ON pd.id_staff = st.id and st.id='".$id_staff."' and st.isdeleted is null
WHERE pd.daydate between date('".$date_start."') and date('".$date_end."')
ORDER BY pd.id_staff, pd.daydate;";
- #print STDERR $sql."\n";
+ //print STDERR $sql."\n";
return $this->dbh->queryarray($sql);
}
}
$chsql = "select sum(maxdays) as maxdays,sum(contracthours - ('00:00:'|| extract(second from contracthours))::interval ) as itmcontracthours from (
select sum(maxdays) as maxdays,sum(maxdays) * (round(cast(((extract(epoch from (current_date + weekhours::interval)::timestamp) - extract(epoch from current_date::timestamp))/3600.0) /weekdays as numeric) ,2)+0.00) * '01:00:00'::interval as contracthours from (
-select case when count(daydate) > weekdays then weekdays else count(daydate)-count(sundays) end as maxdays, calweek,count(daydate) as cntdays,count(sundays) as sundays,weekdays,weekhours from (
+select case when count(daydate) >= weekdays then weekdays else weekdays-count(daydate)-count(sundays) end as maxdays, calweek,count(daydate) as cntdays,count(sundays) as sundays,weekdays,weekhours from (
select id_staff,date(date_trunc('week',daydate)) as calweek,daydate,case when date_part('isodow',daydate)::int4=7 then 1 else null end as sundays
from ".$schema.".staffreportperioddays
# function SyncAll(){
#
# $schema
-# $sync->{staff} = $self->getStaff();
-# $sync->{worktimes} = $self->getWorktimes();
+# $sync->{staff} = $this->getStaff();
+# $sync->{worktimes} = $this->getWorktimes();
# $time = strftime("%Y%m%d%H%M%S");
# open(TT,dirname($0).'/data/timetracker/'.$schema.'/'.);
# print
$sql = "UPDATE ".$schema.".workplandays SET start1=".$this->dbh->value($data["start1"]).", end1=".$this->dbh->value($data["end1"]).", start2=".$this->dbh->value($data["start2"]).", end2=".$this->dbh->value($data["end2"]).", pause=".$this->dbh->value($data["pause"]).", pausestart1=".$this->dbh->value($data["pausestart1"]).", pauseend1=".$this->dbh->value($data["pauseend1"]).", pausestart2=".$this->dbh->value($data["pausestart2"]).", pauseend2=".$this->dbh->value($data["pauseend2"])." WHERE id='".$id."';";
$this->dbh->exec($sql);
$wid = $this->dbh->query("select id_workplan from ".$schema.".workplandays WHERE id='".$id."'");
- $self->updateWorplanData($schema,$wid["id_workplan"]);
+ $this->updateWorkplanData($schema,$wid["id_workplan"]);
return 1;
}
- function updateWorplanData($schema,$workplan_id){
- $self = shift;
- $schema = shift;
- $workplan_id = shift;
+ function updateWorkplanData($schema,$workplan_id){
+
$ispayedpause = $this->dbh->query("select payedpauses from public.companies where schemata='".$schema."'");
$payedpauses = "";
if ($ispayedpause["payedpauses"] != "1"){
<?php
$cfg = array(
- "appversion" => '1.3.7',
+ "appversion" => '1.3.9',
"basepath" => substr(dirname($_SERVER["SCRIPT_FILENAME"]),strlen($_SERVER["DOCUMENT_ROOT"])).'/',
"cookie" => "potlu",
"templatepath" => "tmpl/",
class database {
private $conn;
private $dbconf;
- private $debug=0;
+ private $debug=1;
public function __construct($pdbconf){
$this->dbconf = $pdbconf;
try {
"vacancyill" => "Krankschreibung",\r
"vacancyextra" => "Sonderurlaub",\r
"vacancyextra2" => "Sonder-<br/>urlaub",\r
- "partunempl" => "Kurzarbeit",\r
- "partunempl2" => "Kurzarbeit",\r
"ttentry" => "Kommen",\r
"ttexit" => "Gehen",\r
"tttotal" => "Total",\r
"datasaved" => "Die Daten wurden gespeichert!",\r
"timeperiod" => "Zeitraum",\r
"viewonlyweeks" => "Tage ausblenden",\r
- "viewdays" => "Tage einblenden"\r
+ "viewdays" => "Tage einblenden",\r
+ "otherhours" => "Sonstige",\r
+ "otherpaidhours" => "andere bezahlte Stunden"\r
); ?>
\ No newline at end of file
"vacancyill" => "maladie",
"vacancyextra" => "extraordinaire",
"vacancyextra2" => "c. except.",
- "partunempl" => "chômage part.",
- "partunempl2" => "chômage<br/>partielle",
+
"ttentry" => "entrée",
"ttexit" => "sortie",
"tttotal" => "Total",
"strictworktime" => "heures de travail stricte",
"totalwork" => "Total travail",
"filter" => "filtrer...",
- "statementtransfered3" => "trans.",
+ "statementtransfered3" => "trans.",
"supphourspayed2" => "payé",
"finalstatementpot2" => "Décompte",
"supp44h3" => "+44h",
"datasaved" => "Les données ont été sauvegardées!",
"timeperiod" => "période",
"viewonlyweeks" => "masquer jours",
- "viewdays" => "afficher jours"
+ "viewdays" => "afficher jours",
+ "otherhours" => "Autres",
+ "otherpaidhours" => "autres heures payés"
); ?>
\ No newline at end of file
}
public function getCompanyConfig($schema){
- $sql = "select timetrackertype,sector,viewpartunempl from public.companies where schemata='".$schema."';";
+ $sql = "select timetrackertype,sector from public.companies where schemata='".$schema."';";
return $this->dbh->query($sql);
}
</td>
</tr>
<tr style="border-top: 1px solid black;">
- <th class="labelcol">{{ lbl.partunempl }}</th>
+ <th class="labelcol">{{ lbl.otherpaidhours }}</th>
<td colspan="2">
- <input type="text" class="data_staffreportperioddays" data-column="partunempcomment" placeholder="{{ lbl.comment }}" data-id="" data-table="staffreportperioddays" id="partunempcomment" name="staffreportperioddays_partunempcomment" />
+ <input type="text" class="data_staffreportperioddays" data-column="otherpaidhourscomment" placeholder="{{ lbl.comment }}" data-id="" data-table="staffreportperioddays" id="otherpaidhourscomment" name="staffreportperioddays_otherpaidhourscomment" />
</td>
<th class="resultcol">
- <input class="timefield data_staffreportperioddays" data-column="partunemplhours" data-id="" style="padding-right: 18px; display: inline; width: 86px;" placeholder="00:00" data-table="staffreportperioddays" id="partunemplhours" name="staffreportperioddays_partunemplhours" onblur="staffperiodweeks.checkdaytime();return false;" type="text" value="">
- <a class="inlinebtn" style="margin-top: 1px;margin-left: -26px;" href="javascript:dataform.cleanfield('partunemplhours');staffperiodweeks.checkdaytime();" ><span class="icon icon-remove" style="font-size: 10px;"></span></a>
+ <input class="timefield data_staffreportperioddays" data-column="otherpaidhours" data-id="" style="padding-right: 18px; display: inline; width: 86px;" placeholder="00:00" data-table="staffreportperioddays" id="otherpaidhours" name="staffreportperioddays_otherpaidhours" onblur="staffperiodweeks.checkdaytime();return false;" type="text" value="">
+ <a class="inlinebtn" style="margin-top: 1px;margin-left: -26px;" href="javascript:dataform.cleanfield('otherpaidhours');staffperiodweeks.checkdaytime();" ><span class="icon icon-remove" style="font-size: 10px;"></span></a>
</th>
</tr>
<tr class="resultrow" style="border-top: 2px solid black;">
});
//let maincolumns = ;
reportperiod.tbl = new Tabulator("#tbl_reportperiod", {
- virtualDomHoz:true,
+ //virtualDomHoz:true,
headerFilterPlaceholder:"{{ lbl.filter }}",
height: "calc(100vh - 56px)",
layout: "fitDataFill",
- selectable: 1,
+ selectable: true,
+ selectableRangeMode:"click",
// rowSelected:function(row){
// console.log("rowselected",row);
// if (document.getElementById("pnl_staffperiodweeks").style.cssFloat.display == "block"){
return value;
},
],
+ rowContextMenu:[
+ {label:"<span class=\"rowicon icon-plus\"></span> {{ lbl.add }}", action:function(e, row){reportperiod.add();return false;}},
+ {label:"<span class=\"rowicon icon-edit\"></span>{{ lbl.edit }}", action:function(e, row){reportperiod.editplan();return false;}},
+ {label:"<span class=\"rowicon icon-pdf\"></span>{{ lbl.pdf }}", action:function(e, row){reportperiod.generatereport();return false;}},
+ /*{% if session.usergroup == 'admin' %}*/
+ {label:"<span class=\"rowicon icon-pay\"></span>{{ lbl.finalstatement }}", action:function(e, row){periodvalidation.showdlg();return false;}}
+ /*{% endif %}*/
+
+ ],
columns: [
{title: "{{ lbl.department }}",field:"groupname" , visible: false},
{title: '<span style="font-size: 9pt;">{{ lbl.prename }}</span>',headerFilter:"input",width: 170, field:"prename",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.name }}</span>',headerFilter:"input",width: 170, field:"surname",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.contract }}</span>',width: 70, field:"contracthours",hozAlign:"right",headerSort: false},
- {title: '<span style="font-size: 9pt;">{{ lbl.work }}</span>',width: 65, field:"workhours",hozAlig:"right",headerSort: false},
+ {title: '<span style="font-size: 9pt;">{{ lbl.work }}</span>',width: 65, field:"workhours",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.recuperation_short }}</span>',width: 65, field:"recuperationhours",hozAlign:"right",headerSort: false,formatter:periodRecupFormatter},
{title: '<span style="font-size: 9pt;">{{ lbl.vacancy }}</span>',width: 65, field:"vacancynormal",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 8pt;">{{ lbl.vacancyill2 }}</span>',width:65, field:"vacancyill",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 8pt;">{{ lbl.vacancyextra2 }}</span>',width:65, field:"vacancyextra",hozAlign:"right",headerSort: false},
- //{% if (cmpcfg.viewpartunempl == '1') %}
- {title: '<span style="font-size: 9pt;">{{ lbl.partunempl2 }}</span>',width: 65, field:"partunemplhours",hozAlign:"right",headerSort: false},
- //{% endif %}
+ {title: '<span style="font-size: 9pt;">{{ lbl.otherhours }}</span>',width: 65, field:"otherpaidhours",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.total }}</span>',width: 65, field:"totalhours",hozAlign:"right",headerSort: false,formatter:periodTotalFormatter},
{title: '<span style="font-size: 8pt;">{{ lbl.statementtransfered2 }}</span>',width: 70, field:"transferedhours",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.supphourspayed2 }}</span>',width: 65, field:"payedhours",hozAlign:"right",headerSort: false,headerVertical:true} ,
{title: '<span style="font-size: 9pt;">{{ lbl.supp44h2 }}</span>',width: 50, field:"suppvacancy44hours",hozAlign:"right",headerSort: false,headerVertical:true},
{title: '<span style="font-size: 9pt;">{{ lbl.suppsunwork }}</span>',width: 50, field:"suppvacancysunwork",hozAlign:"right",headerSort: false,headerVertical:true},
{title: '<span style="font-size: 8pt;">{{ lbl.avgweek_short }}</span>',width: 60, field:"avgtotalweekhours",hozAlign:"right",headerSort: false,formatter:periodAVGFormatter},
- {title: '<span style="font-size: 9pt;">{{ lbl.validated }}</span>',width: 40, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false},headerVertical:true}
+ {title: '<span style="font-size: 9pt;">{{ lbl.validated }}</span>',width: 40, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false},headerVertical:true},
+ // {title: '<span style="font-size: 9pt;">{{ lbl.maxdays }}</span>',width: 60, field:"maxdays",hozAlign:"center",headerSort: false}
]
});
staffperiodweeks.edit();
},
rowContext:function(e, row){e.preventDefault();},
+ rowContextMenu:[
+ {label:'<span class="rowicon icon-edit"></span>{{ lbl.edit }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-copy"></span>{{ lbl.copy }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-paste" id="spwpasteval"></span>{{ lbl.paste }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-erase"></span>{{ lbl.clean }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-replace"></span>{{ lbl.changetemplate }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-shrink"></span>{{ lbl.viewonlyweeks }}', action:function(e, row){}},
+ {label:'<span class="rowicon icon-expand"></span>{{ lbl.viewdays }}', action:function(e, row){}},
+ ],
groupBy:["weekstart"],
groupStartOpen:[true],
groupClosedShowCalcs:true,
{ title: "Coup.",field: "interruptionhours",headerSort:false,hozAlign:"center",formatter:interruptFormatter},
{ title: "{{ lbl.vacancy }}",field: "dspvacancyhours",headerSort: false,hozAlign:"center",formatter:vacancyformatter,bottomCalc:staffperiodweeks.setweekvacancyhours},
{ title: "{{ lbl.recuperation_short }}",field: "recuperationhours",hozAlign:"center",headerSort: false,formatter:recupformatter,bottomCalc:staffperiodweeks.setweekrecuperationhours},
- //{% if (cmpcfg.viewpartunempl == '1') %}
- { title: "{{ lbl.partunempl2 }}",field:"partunemplhours",hozAlign:"center",headerSort: false},
- //{% endif %}
+ { title: "{{ lbl.otherhours }}",field:"otherpaidhours",hozAlign:"center",headerSort: false},
{ title: "{{ lbl.total|raw }}",field: "dayhours",hozAlign:"center",headerSort: false,formatter:totalFormatter,bottomCalc:staffperiodweeks.setweektotalhours,bottomCalcFormatter:"html"},
{ title: "{{ lbl.diffcontract|raw }}",field:"diffhours",hozAlign:"center",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.setweekdiffhours},
{ title: "{{ lbl.avgweek_short }}",field: "avgweekhours",hozAlign:"center",headerSort: false,formatter:nullFormatter,bottomCalc:staffperiodweeks.setavgweekhours},
}
return "";
},
- setweekunemplhours: function(values, data, calcParams){
- if (staffperiodweeks.weekdata && staffperiodweeks.weekdata[data[0].weekstart]) {
- //var maxcolor ="";
- // if (staffperiodweeks.weekdata[data[0].weekstart].totalhours > staffperiodweeks.weekdata[data[0].weekstart].defaultweekhours){
- // maxcolor = "color: orange;";
- // }
- // if (staffperiodweeks.weekdata[data[0].weekstart].totalhours > staffperiodweeks.weekdata[data[0].weekstart].maxweekhours){
- // maxcolor = "color: red;";
- // }
- return '<span style="'+ maxcolor +'">' + staffperiodweeks.weekdata[data[0].weekstart].partunemplhours + '</span>';
- }
- return "";
- },
+ // setweekunemplhours: function(values, data, calcParams){
+ // if (staffperiodweeks.weekdata && staffperiodweeks.weekdata[data[0].weekstart]) {
+ // //var maxcolor ="";
+ // // if (staffperiodweeks.weekdata[data[0].weekstart].totalhours > staffperiodweeks.weekdata[data[0].weekstart].defaultweekhours){
+ // // maxcolor = "color: orange;";
+ // // }
+ // // if (staffperiodweeks.weekdata[data[0].weekstart].totalhours > staffperiodweeks.weekdata[data[0].weekstart].maxweekhours){
+ // // maxcolor = "color: red;";
+ // // }
+ // return '<span style="'+ maxcolor +'">' + staffperiodweeks.weekdata[data[0].weekstart].otherpaidhours + '</span>';
+ // }
+ // return "";
+ // },
settotaltrackhours: function(values, data, calcParams){
let mts = 0;
for (let m in values){
// document.getElementById("vacextracomment").value='';
// document.getElementById("recupcomment").value='';
// document.getElementById("partunempcomment").value='';
-
+ console.log("CDAY",staffperiodweeks.currentday);
dataform.fillformbydataclass2("staffreportperioddays",staffperiodweeks.choices,staffperiodweeks.currentday);
document.getElementById("display_date").innerHTML=moment(staffperiodweeks.currentday.daydate).format("dddd , DD.MM.YYYY");
//document.getElementById("display_staffname").innerHTML=selrp[0].staffname;
let ovach = document.getElementById("vacancyhours");
let ovill = document.getElementById("vacillhours");
let ovextra = document.getElementById("vacextrahours");
- let opartunempl = document.getElementById("partunemplhours");
+ let ootherhours = document.getElementById("otherpaidhours");
let orech = document.getElementById("recuperationhours");
let odyh =document.getElementById("dayhours");
let oirupt = document.getElementById("interruptionhours");
if (ovach.value){ vactime = timecalc.TimeToMinutes(ovach.value);}
if (ovill.value){villtime = timecalc.TimeToMinutes(ovill.value);}
if (ovextra.value){vextratime = timecalc.TimeToMinutes(ovextra.value);}
- if (opartunempl.value){unempltime = timecalc.TimeToMinutes(opartunempl.value);}
+ if (ootherhours.value){unempltime = timecalc.TimeToMinutes(ootherhours.value);}
if (orech.value){reptime = timecalc.TimeToMinutes(orech.value);}
let fulldaytime = wktime+vactime+reptime+villtime+vextratime+unempltime;
odyh.value= timecalc.MinutesToTime(fulldaytime);
cell.getElement().style.fontSize="10pt";return cell.getValue();
}
else if (cell._cell.row.data.dayhours == null){
- return "jour de repos";
+ return "{{lbl.freeday}}";
}
return cell.getValue();
};
{title: '<span style="font-size: 9pt;">{{ lbl.vacancy }}</span>', field:"vacancynormal",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.vacancyill2 }}</span>', field:"vacancyill",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 8pt;">{{ lbl.vacancyextra2 }}</span>',width:65, field:"vacancyextra",hozAlign:"right",headerSort: false},
- //{% if (cmpcfg.viewpartunempl == '1') %}
- {title: '<span style="font-size: 9pt;">{{ lbl.partunempl2 }}</span>',width: 65, field:"partunemplhours",hozAlign:"right",headerSort: false},
- //{% endif %}
+ {title: '<span style="font-size: 9pt;">{{ lbl.otherhours }}</span>',width: 65, field:"otherpaidhours",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;"></span>{{ lbl.total }}</span>', field:"totalhours",hozAlign:"right",headerSort: false,formatter:periodTotalFormatter},
{title: '<span style="font-size: 9pt;">{{ lbl.statementtransfered2 }}</span>', field:"transferedhours",hozAlign:"right",headerSort: false},
{title: '<span style="font-size: 9pt;">{{ lbl.supphourspayed2 }}</span>', field:"payedhours",hozAlign:"right",headerSort: false,headerVertical:true} ,