

<!--onLoad="window.print()"-->

<body >

    <?php $this->load->view("common/header"); ?>

    <style type="text/css">

        .report_view_th{

            color:#000 !important;

            font-size:12px;	

        }



        .table-responsive td{

            font-size:11px;

            background-color:#fff !important;	

        }

        h4{

            font-size:13px;

        }

        body{

            background-color:#fff !important;

        }

        .print_header_tbl{

            font-size:13px;

            border:1px;	

        }

        .print_header_tbl td{

            padding-bottom:5px;

            border:1px;		

        }



        .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {

          

            line-height: 1;

            padding: 3px;

            vertical-align: top;
			border-bottom:1px solid #555F55;
			border-top:0px solid #555F55

        }
        
        .borderless td, .borderless th {
    border: none !important;
}
.table-responsive{
    border: none !important;
}

.table > tbody + tbody {
  border-top: 0px solid #ddd !important;
}

.classTable, .classTable td{
	border:1px solid #525252 !important;
	
}
.left_padding{
	margin-left:50px;
	
}
td{
	font-size:12px !important;
	text-transform:uppercase;
}
th{
	font-size:12px !important;
	text-transform:uppercase;
}
    </style>
    





    <div class="">









        <div class="modal-body">



            <div style="top:2px;" class="panel-tools open">

                <button data-toggle="dropdown" class="btn btn-blue dropdown-toggle" onClick="window.print()">

                    <i class="fa fa-print"></i>

                </button>

            </div>
            
            <div style="border: 0px solid black">

            <div class="row">
            
            <?php //print_r($user_details);?>

                <div class="col-xs-12 text-center">
                    
                    <?php if(isset($warehouse_details['name'])){
                        echo '<h3>'.$warehouse_details['name'].'</h3>';
                    } ?>
                    
                    <h5><?php echo $warehouse_details['address'] ?></h5>

<?php 
$manth_name=date("F", strtotime($this->input->get('srh_to_date'))); 
$year_name=date("Y", strtotime($this->input->get('srh_to_date')));
?>

                  <h4 class="text-bold" style="text-decoration:underline; font-weight:bold; text-transform:uppercase">
                    Pay Slip for the Month of <?php echo $manth_name;?> <?php echo $year_name ?>
                    <!--PAY SHEET--></h4>
            </div><!--col-xs-12-->

            </div>

            <div style="margin-bottom:5px;" class="row">

                <?php //print_r($exp_details);?>

                <div class="col-xs-6 pull-left">

                    <div class="table-responsive">
                        <table class="table borderless table-hover table-striped print-table order-table">
                            <tr>
                                <td>NAME :</td>
                                <td><?php echo $user_details['user_first_name'] . " " . $user_details['user_last_name'] ?> </td>
                            </tr>
                            <tr>
                                <td>EPF No :</td>
                                <td><?php echo $user_details['user_epf_no'] ?></td>
                            </tr>
                            <tr>
                                <td>EMPLOYEE NO :</td>
                                <td><?php echo $user_details['user_emp_no'] ?></td>
                            </tr>
                            <tr>
                                <td>DESIGNATION :</td>
                                <td><?php echo $user_details['user_designation'] ?></td>
                            </tr>
                            <tr>
                                <td>ADDRESS :</td>
                                <td><?php echo $user_details['user_address'] ?></td>
                            </tr>
                        </table>
                    </div>
                </div>
                
                <div class="col-xs-6 pull-right">
                    <div class="table-responsive">
                        <table class="table borderless table-hover table-striped print-table order-table">
                            <tr>
                              <td>ID No. :</td>
                              <td><?php echo $user_details['user_id_no'] ?></td>
                            </tr>
                           <!-- <tr>
                                <td>PAYMENT TYPE :</td>
                                <td><?php //echo 'Bank' ?> </td>
                            </tr>-->
                            <tr>
                                <td>BANK :</td>
                                <td><?php echo $user_details['bank_name'] ?></td>
                            </tr>
                            <tr>
                                <td>BRANCH :</td>
                                <td><?php echo $user_details['user_branch'] ?></td>
                            </tr>
                            <tr>
                                <td>ACCOUNT NO :</td>
                                <td><?php echo $user_details['user_account_no'] ?></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div> 
            
            </div>
            <div style="border: 0px solid black; border-top: none">


            <table id="classTable" class="table">
              
                    <tr >
                        <td colspan="2"><div style="font-weight:bold">EARNING</div></td>
                </tr>
                
                <tbody>
                <?php $gross_salary = 0; ?>
                    <?php foreach ($salary_details as $row) { ?>
                        <?php if ($row['mstr_sal_type_id']==17 || $row['mstr_sal_type_id']==18) 
						{ ?>
                            
                           
                            <tr>
                                <td><span class="left_padding"></span> <?php echo $row['mstr_sal_type_name'] ?></td>
                                <td align="right"><?php echo number_format($row['s_amount'], 2) ?></td>
                            </tr>
                            <?php
                            $gross_salary = $gross_salary + $row['s_amount'];
                        }
                    }
                    ?>
                    <!--<tr>
                        <td><span class="left_padding"></span> Basic Salary</td>
                        <td width="40%" align="right"><?php echo $user_details['user_basic_salary'] ?></td>
                    </tr>
                    <tr>
                        <td><span class="left_padding"></span>Basic Allowance</td>
                        <td width="40%" align="right"><?php echo $user_details['user_other_allowance'] ?></td>
                    </tr>-->
                    <tr>
                              <td><strong>Gross Salary</strong></td>
                              <td align="right"><strong><?php echo number_format($gross_salary, 2) ?></strong></td>
                            </tr>
                             <tr  style="height : 27px ; border-left: none">
                        <th style="border-bottom:0px solid black !important;" colspan="2"></th>
                    </tr>
                     <tr>
                              <td style="border-top:0px solid black !important;"><strong>ADDITIONS</strong></td>
                              <td align="right">&nbsp;</td>
                            </tr>
                    <?php $earnings = 0; ?>
                    <?php foreach ($salary_details as $row) { ?>
                        <?php if ($row['mstr_sal_type_did_add'] == 1) {
							if ($row['mstr_sal_type_id']!=17) 
						{
							if ($row['mstr_sal_type_id']!=18) { 
							 ?>
                            
                           
                            <tr>
                                <td><span class="left_padding"></span> <?php echo $row['mstr_sal_type_name'] ?> </td>
                                <td align="right"><?php echo number_format($row['s_amount'], 2) ?></td>
                            </tr>
                            <?php
                            $earnings = $earnings + $row['s_amount'];
                        }}
                    }
					}
                    ?>
                    <tr>
                        <th>Total ADDITIONS</th>
                        <td align="right"><strong><?php echo number_format($earnings, 2) ?></strong></td>
                    </tr>
                    <?php
					$total_salary=$gross_salary+$earnings;
                   // $gross_salary = 0;
                    //$gross_salary = $earnings + $user_details['user_basic_salary']+$user_details['user_other_allowance'];
                    ?>
                     <tr  style="height : 27px ; border-left: none">
                        <th colspan="2"></th>
                    </tr>
                    <tr >
                        <th>Total Salary</th>
                        <td align="right"><strong><?php echo number_format($total_salary, 2) ?></strong></td>
                    </tr>

                </tbody>
                <tr  style="height : 27px ; border-left: none">
                        <th colspan="2" style="border-bottom:0px solid black !important;"></th>
                    </tr>
            
                    <tr >
                        <td colspan="2"><div style="font-weight:bold">DEDUCTIONS</div></td>
                </tr>
              
                <tbody>
                    <?php $deductions = 0; ?>
                    <?php foreach ($salary_details as $row) { ?>
                        <?php if ($row['mstr_sal_type_did_add'] == 0) { 
						if ($row['mstr_sal_type_id']!=15){
							if ($row['mstr_sal_type_id']!=19)
						 { ?>
                            <tr >
                                <td><span class="left_padding"></span> <?php echo $row['mstr_sal_type_name'] ?></td>
                                <td align="right"><?php echo number_format($row['s_amount'], 2) ?></td>
                            </tr>
                            <?php
                            $deductions = $deductions + $row['s_amount'];
                        }
                    }
						}
					}
                    ?>
                    
                    <?php
					//print_r($salary_payment_details);
					
					 foreach ($salary_payment_details as $row) { ?>
					 
					 <!-- 
                            <tr >
                                <td> <span class="left_padding"></span>Advance</td>
                                <td align="right"><?php echo number_format($row['tot_sp_amount'], 2) ?></td>
                            </tr>
                            
                            -->
                            <?php
                            $deductions = $deductions + $row['tot_sp_amount'];
                    }
                    ?>
                    
                       <!-- <tr >
                        <td><span class="left_padding"></span>EPF Contribution 8%</td>
                        <td align="right">0.00</td>
                        </tr>-->
                       <!-- <tr >
                        <td><span class="left_padding"></span>ESD Contribution</td>
                        <td align="right">0.00</td>
                        </tr>-->
                        <?php //$esd = 0; ?>
                    <?php foreach ($salary_details as $row) { ?>
                        <?php if ($row['mstr_sal_type_id']==15 || $row['mstr_sal_type_id']==19) 
						{ ?>
                            
                           
                            <tr>
                                <td><span class="left_padding"></span><?php //echo "id:".$row['mstr_sal_type_id']."," ?> <?php echo $row['mstr_sal_type_name'] ?></td>
                                <td align="right"><?php echo number_format($row['s_amount'], 2) ?></td>
                            </tr>
                            <?php
                            $deductions = $deductions + $row['sl_amount'];
                        }
                    }
                    ?>
                    
                    <?php
                $net_salary = $total_salary - $deductions;
				
				/*
			EPF CONTRIBUTION
            ETF CONTRIBUTION
            ESD CONTRIBUTION
				*/
                ?>
                    <tr>
                        <th>Total Deductions</th>
                        <td align="right"><strong><?php echo number_format($deductions, 2); ?></strong></td>
                    </tr>
                      <tr  style="height : 27px ; border-left: none">
                        <th colspan="2"></th>
                    </tr>
                
                    <tr >
                        <th>Net Salary</th>
                        <td align="right"><strong><?php echo number_format($net_salary, 2); ?></strong></td>
                    </tr>
                    
                     <tr style="height : 27px ; border-left: none">
                        <th colspan="2"></th>
                    </tr>
                    
            
                    <tr>
                        <td colspan="2"><div style="font-weight:bold">Employer Contribution</div></td>
                </tr>
                 
                     <!--<tr >
                        <td><span class="left_padding"></span>EPF Contribution 12%</td>
                        <td align="right">0.00</td>
                        </tr>
                        
                        <tr >
                        <td><span class="left_padding"></span>ETF Contribution 3%</td>
                        <td align="right">0.00</td>
                        </tr>-->
                         <?php $tot_emp_contribution = 0; ?>
                    <?php foreach ($salary_details as $row) { ?>
                        <?php if ($row['mstr_sal_type_id']==21 || $row['mstr_sal_type_id']==20) 
						{ ?>
                            
                           
                            <tr>
                                <td><span class="left_padding"></span> <?php echo $row['mstr_sal_type_name'] ?></td>
                                <td align="right"><?php echo number_format($row['s_amount'], 2) ?></td>
                            </tr>
                            <?php
                            $tot_emp_contribution = $tot_emp_contribution + $row['s_amount'];
                        }
                    }
                    ?>
                    
                     <tr >
                        <th>Total Employer Contribution</th>
                        <td align="right"><strong><?php echo number_format($tot_emp_contribution, 2); ?></strong></td>
                    </tr>
                       
                </tbody>

            </table>
                
                </div>


        </div>


</body>



