"Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "May", "6" => "June", "7" => "July", "8" => "Aug", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
$currentmontharray = array(array($month . "-" . $year => $monthsoptions[$month] . "-" . $year));
// For find out Next and previous month and year from current year
$aftersix = array();
for ($i = 0; $i < 3; $i++) {
$month++;
if ($month > 12) {
$month = 1;
$year = $year + 1;
}
$aftersix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
}
$year = date("Y");
$month = date("m");
$beforesix = array();
for ($i = 3; $i > 0; $i--) {
$month--;
if ($month < 1) {
$month = 12;
$year = $year - 1;
}
$beforesix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
}
$beforesix = array_reverse($beforesix);
$options = array_merge($options, $beforesix);
//echo count($options);
$options = array_merge($options, $currentmontharray);
$options = array_merge($options, $aftersix);
$ot = array();
foreach ($options as $o) {
foreach ($o as $key => $value) {
$ot[$key] = $value;
}
}
?>
| S.No |
Emp ID |
Employee |
Salary |
Per Day Salary |
Per hr Salary |
Over Time Hrs |
Over Time Amount |
$record) {
// print_r($record);
?>
|
EmpID; ?> |
FirstName; ?> |
TotalSalary;
$totalsalary[] = $record->TotalSalary; ?>
|
TotalSalary / $record->NoofDays;
echo number_format($perDaySalary, 2, '.', '');
$totalperdaySalary[] = $perDaySalary; ?>
|
|
OT_Hrs_Worked;
echo $OT;
$totalOThrs[] = $record->OT_Hrs_Worked;
?>
|
NoofDays;
// $HRA_Amount = $record->HRA_Amount;
// $Basic_Pay = $record->Basic_Pay;
// $OT_Hrs_Worked = $record->OT_Hrs_Worked;
// $dayBasic = $Basic_Pay / $NoofDays;
// $dayHra = $HRA_Amount / $NoofDays;
// $oneHoursSalary = ($dayBasic + $dayHra) / 8;
// $OTSalary = ($OT_Hrs_Worked != 0) ? $OT_Hrs_Worked * $oneHoursSalary : 0;
$OTSalary = $OT * $perHrSalary;
echo number_format($OTSalary, 2);
$totalOTsalary[] = $OTSalary;
?>
|
|
|
Total |
|
|
|
|
|