<td width="5%" align="center"><b>Employee Name</b></td> 
   <td width="15%" align="center"><b>Designation</b></td>
   <td align="center"><b>Basic</b></td>
   <td align="center"><b>Hrs</b></td>
   <td align="center"><b>Cal/Pay</b></td>
   <td align="center"><b>Side/Amount</b></td>
   <td align="center"><b>N/Payable</b></td>
 </tr>
   <?
   while($row=mysql_fetch_array($result_prj))
   {
   
   $emp_id=$row['id'];														
                                                                   
   $total_salary_earing=0;
   $total_salary_basic=getSalaryDetail("basic",$emp_id,getdbDate($month));
   if($row['employee_typ']=='daily_wages')
       {
           $salary_basic=$total_salary_basic/8;
       }
       else
       {
           $salary_basic=($total_salary_basic/31)/8;
       }
   $good_work=getGoodWorkBydate($emp_id,getdbDate($month));
   if($good_work!="")
   {
    ?>
  <tr <? if ($sno%2==1) { ?> bgcolor="#F8F8F8" <? } ?> class="tableTxt">
   <td width="5%" align="center"><?=$sno?></td>
   <td width="5%" align="center"><?=$row['ticket_no']?></td>
 $daysago = floor($difference / 60 / 60 / 24);
 //Calculates Days Old
 $i = 0;
 while ($i <= $daysago + 1) {
     if ($i != 0) {
         $date = $date + 86400;
     } else {
         $date = $date - 86400;
     }
     $today = date('Y-m-d', $date);
     $yy = date('Y', $date);
     $mm = date('m', $date);
     $dd = date('d', $date);
     $date1 = $yy . "-" . $mm . "-" . $dd;
     if (getLeavestatusBydate($emp_id, $date1) == 'P') {
         $total_salary_basic = $total_salary_basic + getSalaryDetail("basic", $emp_id, $date1) / $day2;
     }
     $i++;
 }
 $bonus = $total_salary_basic * 8.33 / 100;
 ?>
                                                                     <tr>
                                                                         <td colspan="3">
                                                                         </td>
                                                                         <td>
                                                                             <?php 
 echo $month_year;
 ?>
                                                                         </td>
                                                                         <td>
                                                                             <?php 
Example #3
0
		<tr class="gredBg">
			<td width="10%" align="center"><b>S.No.</b></td>
			<td width="10%" align="center"><b>Emp Id</b></td>
			<td width="30%" align="center"><b>Employee Name</b></td> 
			<td width="10%" align="center"><b>Designation</b></td>
			<td width="10%" align="center"><b>Basic</b></td>
			<td width="10%" align="center"><b>Hrs</b></td>
			<td width="10%" align="center"><b>Shift</b></td>
			<td align="center"><b>Check Here</b></td>
		</tr>
<? $sno_d =1;
while($row=mysql_fetch_array($result_prj)){
	$emp_id=$row['id'];
	
	$total_salary_earing=0;
	$total_salary_basic=getSalaryDetail("basic",$emp_id,getdbDate($date_upto));
	if($row['employee_typ']=='daily_wages'){
		$salary_basic=$total_salary_basic/8;
	}else{
		$salary_basic=($total_salary_basic/31)/8;
	}
	$good_work=getGoodWorkBydate($emp_id,getdbDate($date_upto));
	if($good_work!=""){?>
		<tr <? if ($sno_d%2==1) { ?> bgcolor="#F8F8F8" <? } ?> class="tableTxt">
			<td width="5%" align="center"><?php 
echo $sno_d;
?>
</td>
			<td width="5%" align="center"><?php 
echo $row['ticket_no'];
?>
                        }
                        $total_esi = ceil("$total_esi");
                        $total_deductions = round($total_pf + $total_esi + $total_advance + $other_deductions + $prof_tax + $tds + $total_loan + $monthDeduction);

                        $net_salary = $total_earning - $total_deductions;
                        $grand_days = $grand_days + $Total;

                        /** Over Time Calculation */
                        $select_otp = mysql_query("select * from mpc_ot_policy where status = 1");
                        $fetch_otp = mysql_fetch_array($select_otp);
                        $otp = $fetch_otp['policy_type'];
                        $rec_id_ot = $fetch_otp['rec_id'];
                        $tot_ot = 0;
                        $check_date = $month;
                        $tgw = 0;
                        $basic_rate = getSalaryDetail("basic", $emp_id, $date1);
//        echo "select * from mpc_good_work_master where emp_id=$emp_id";
                        $select_ot = mysql_query("select * from mpc_good_work_master where emp_id=$emp_id");
                        while ($fetch_ot = mysql_fetch_array($select_ot)) {
                            $pay_date = date('m', strtotime($fetch_ot['date']));
                            if ($pay_date == $check_date) {
                                $good_work = str_replace(":", ".", "$fetch_ot[good_work]");
                                if ($otp == 1) {
                                    if ($rec_id_ot == 1) {
                                        $ot_amount = round(($basic_rate / $dd / 8) * $good_work);
                                    }
                                    if ($rec_id_ot == 2) {
                                        $ot_amount = round((($basic_rate / $dd / 8 ) * $good_work) * 2);
                                    }
                                }
                                if ($otp == 2) {
                                                                                            $side_allowance = $side_allowance + (getSalaryDetail("side_allowance", $emp_id, $date1) / $day2);
                                                                                            $other_deductions = $other_deductions + (getSalaryDetail("other_deductions", $emp_id, $date1) / $day2);
                                                                                        }

                                                                                        $i++;
                                                                                    }
                                                                                    $total_earning = $total_salary_basic + $total_lta + $total_convence + $total_medical + $total_hra + $side_allowance;


                                                                                    $total_pf = ($total_salary_basic * getAccountDetail('pf_rate', $emp_id)) / 100;
                                                                                    $total_esi = ($total_earning * getAccountDetail('esic_rate', $emp_id)) / 100;

                                                                                    $total_advance = getadvance($emp_id, $mm, $yy);
                                                                                    $total_loan = getloan($emp_id);
                                                                                    $prof_tax = getSalaryDetail("professional_tax", $emp_id, $date1);
                                                                                    $tds = getSalaryDetail("other_deductions", $emp_id, $date1);

                                                                                    $total_deductions = $total_pf + $total_esi + $total_advance + $other_deductions + $prof_tax + $tds;

                                                                                    $net_salary = $total_earning - $total_deductions;


                                                                                    $dept_total_salary_basic = $dept_total_salary_basic + $total_salary_basic;
                                                                                    $dept_total_lta = $dept_total_lta + $total_lta;
                                                                                    $dept_total_convence = $dept_total_convence + $total_salary_basic;
                                                                                    $dept_total_medical = $dept_total_medical + $total_medical;
                                                                                    $dept_total_hra = $dept_total_hra + $total_hra;
                                                                                    $dept_side_allowance = $dept_side_allowance + $side_allowance;
                                                                                    $dept_total_salary_basic = $dept_total_salary_basic + $other_deductions;

                                                                                    $dept_prof_tax = $dept_prof_tax + $prof_tax;
																				}
																						
																				$basic_rate=getSalaryDetail("basic",$emp_id,$date1);
				
																				$total_earning=$total_salary_basic+$total_lta+$total_convence+$total_medical+$total_hra+$side_allowance;
																				$total_pf=($total_salary_basic*getAccountDetail('pf_rate',$emp_id))/100;
																				
																				$total_esi=($total_earning*getAccountDetail('esic_rate',$emp_id))/100;
																				
																				
				
																				$total_advance=getadvance($emp_id,$mm,$yy);
																				
																			    $total_loan=getloanDeduction($emp_id,$mm,$yy);
																				$prof_tax=getSalaryDetail("professional_tax",$emp_id,$date1);
																				$tds=getSalaryDetail("tds",$emp_id,$date1);
																				$monthDeduction=getSalaryDeduction($emp_id,$mm,$yy);
																				
																				$sql = "SELECT sum(salary_fine) as salary_fine,sum(salary_damage) as salary_damage,sum(salary_canteen) as salary_canteen ,sum(salary_society_welfare) as salary_society_welfare, sum(salary_electrical) as salary_electrical, sum(salarly_security) as salarly_security ,sum(salary_house_rent) as salary_house_rent FROM mpc_salary_deduction where emp_id  = '".$emp_id."' and  MONTH(salary_deduction_date)='".$month."' and YEAR(salary_deduction_date) ='".$year."'";
																				
																				$result_fine = mysql_query ($sql) or die ("Error in : ".$sql."<br>".mysql_errno()." : ".mysql_error());
																				if(mysql_num_rows($result_fine)>0)
																				{
																					$row_salary_deduction=mysql_fetch_array($result_fine);
																				}
																			
																			$total_esi=ceil("$total_esi");
																				
																				
																			$total_deductions=round($total_pf)+$total_esi+$total_advance+$other_deductions+$prof_tax+$tds+$total_loan+$monthDeduction;
																				
Example #7
0
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            $i++;
        }
        $pre = $present + $Pl + $h + $wo;
        $pay_count = $pay_count + $Pl + $h + $wo;
        $total_pre = $pre + $total_pre;
        $total_salary_basic = round(getSalaryDetail("basic", $emp_id, $date1) / $day2 * $pay_count);
        $pf_rate = getAccountDetail('pf_rate', $emp_id);
        $total_pf = round($total_salary_basic * getAccountDetail('pf_rate', $emp_id) / 100);
        $total_epf_employer = $total_salary_basic * 3.67 / 100;
        $total_fpf_employer = $total_salary_basic * 8.33 / 100;
        if ($pf_rate > 0) {
            ?>
                                        <tr <?php 
            if ($sno % 2 == 1) {
                ?>
 bgcolor="#F8F8F8" <?php 
            }
            ?>
 class="tableTxt">
                                            <td width="5%" align="center"><?php 
            echo $sno;
Example #8
0
</td>
                    <td><?php 
    echo $month_days = date("t", strtotime($year . "-" . $i . "-01"));
    ?>
</td>
                    <td><?php 
    echo $no_present = getleavecountMonthly($emp_id, "P", $i, $year);
    ?>
</td>
                	<td><?php 
    if ($i <= date('m')) {
        $total_month = 0;
        for ($j = 1; $j <= $month_days; $j++) {
            $date = mktime(0, 0, 0, $i, $j, $year);
            $dd = date('d', $date);
            $salary_ann = getSalaryDetail("basic", $emp_id, $year . '-' . $i . '-' . $dd);
            if (getofficeDetail('employee_typ', $emp_id) == 'daily_wages') {
                $per_day = $salary_ann / $month_days;
            } else {
                $per_day = $salary_ann / $month_days;
            }
            $total_month = $total_month + $per_day;
        }
        $total_month = round($total_month, 2);
        echo round($no_present * $total_month / $month_days);
    }
    ?>
                    </td>
                    <!--<td>&nbsp;</td>
                    <td>&nbsp;</td>-->
                    <td colspan="2"><?php 
Example #9
0
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getofficeDetail('employee_typ', $emp_id);
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getdesignationMaster('emp_category', 'rec_id', getdesignationDetail('designation_id', $emp_id, getdbDateSepretoe($txt_from_date)));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getSalaryDetail('basic', $emp_id, getdbDateSepretoe($txt_from_date));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime(getofficeDetail('date_joining', $emp_id));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime($row['dob']);
?>
&nbsp;
                                                                </td>