"; // echo count($attendance); // echo "
"; // print_r($emppay); // echo "
"; // echo count($emppay); //print_r($datefordropdown); //print_r($noofpublicholidays);print_r($publicholidaysarray); $datefordropdown = date_create($datefordropdown); $datefordropdown = date_format($datefordropdown,'M-Y'); //echo $datefordropdown; $attendance = array_merge($attendance,$emppay); $currentday = date('d'); // print_r($attendance); // echo "
------------------------------
"; ?>

Employee Monthly Attendance View/Edit

'atten'); echo form_open('attendance', $attributes); $today = date('M-Y'); $data = array('type' => 'text','name' => 'month','id' => 'month','value' => $datefordropdown,'class' => 'form-control select2'); echo form_input($data);?>
format("D") == "Sun") //Check that the day is Sunday here // { // array_push($ind,$begin->format("d")); // } // $begin->modify('+1 day'); // } // $noofsundays = count($ind); $testarray=array(); $finalarray = array(); if(!empty($attendance)) { foreach($attendance as $record) { //$index++; if(in_array($record->EmpID,$testarray)) { //$index--; } else{ array_push($testarray,$record->EmpID); array_push($finalarray,$record); } } } //print_r($testarray);echo count($testarray); //echo "
...........................
"; //print_r($finalarray);echo count($finalarray); // $index = 0; // foreach($finalarray as $gg ) // { // echo "
...........................
"; // $index = $index +1; // echo "S.NO" . $index . "
"; // echo "EmpID" . $gg->EmpID ."
"; // //echo $key ."-".$value; // for ($col =1; $col <= $monthdays;$col++){ // $flag =0; // foreach($ind as $in) // { // if($in == $col) // { // $flag = 1; // } // } // $WH='WH'.$col; // $OT = 'OT'.$col; // if(!empty($gg->$WH)){echo "WORK" . $gg->$WH."--";}else{echo "WORK" . "0--";} // if(!empty($gg->$OT)){echo "OT" . $gg->$OT. "--";}else{echo "OT" . "0--";} // } // // /// echo "$WH"; // //print_r($gg); // //break; // } //die(); ?>
H_Date; $temp = substr($temp,8); $title = ''; if($temp == $col) { $flag2 = 1; //$title ="Public Holiday-" . str_replace(" ","_",$h->H_Name); $title = str_replace(" ","_",$h->H_Name); //echo $title; } } ?> H_Date; $temp = substr($temp,8); $title = ''; $flag2 = 0; if($temp == $col) { $flag2 = 1; //$title ="Public_Holiday-" . str_replace(" ","_",$h->H_Name); $title = str_replace(" ","_",$h->H_Name); //echo $title; } } $WH='WH'.$col; $OT = 'OT'.$col; ?>
S.NO Employee ID Employee Name title = "Sunday" title = class="celda_encabezado_general" >".$col . "W";}else{echo $col."W";}?> title = "Sunday" title = class="celda_encabezado_general" >".$col . "OT";}else{echo $col."OT";}?> Total Hrs OT Hrs Paid Leave Days Worked Absent
EmpID;?> FirstName.'-'.$a->LastName;?> title = "Sunday" title = class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="" contenteditable = "true">$WH)){echo $a->$WH;}else{echo "0";}?> title = "Sunday" title = class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="" contenteditable = "true">$OT)){echo $a->$OT;}else{echo "0";}?> Total_WHrs)){echo $a->Total_WHrs;}else{echo "0.00";}?> Total_OTHrs)){echo $a->Total_OTHrs;}else{echo "0.00";}?> Paid_Leave)){echo $a->Paid_Leave;}else{echo "0.00";}?> Days_Worked)){echo $a->Days_Worked;}else{echo "0.00";}?> Absent)){echo $a->Absent;}else{echo "0.00";}?>