ok

Mini Shell

Direktori : /home2/selectio/www/obnovit-tracking/old/
Upload File :
Current File : /home2/selectio/www/obnovit-tracking/old/payslip-generated-view.php

<?php  include "header.php";

$generated_id="0";
$id=0;

if(isset($_GET['id'])){$id=$_GET['id'];}
if(isset($_GET['payslip-id'])){$generated_id=$_GET['payslip-id'];}


$statement = $pdo->prepare("SELECT tbl_user.uan_pf_no,tbl_user.esi_no,tbl_user.employeeid,tbl_user.emp_name,tbl_desgination.desgination as designation_name,tbl_departement.departement as department_name,tbl_payslip_generation.* FROM `tbl_payslip_generation` inner join tbl_user on tbl_payslip_generation.employee_id=tbl_user.id inner JOIN tbl_desgination on tbl_user.designation_id=tbl_desgination.id inner JOIN tbl_departement on tbl_user.department_id=tbl_departement.id WHERE tbl_user.id!=1 and tbl_user.id=$id and tbl_payslip_generation.id=$generated_id");
    $statement->execute();
    $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    $totalData = $statement->rowCount();
    
?>
<div class="content-wrapper" style="background:white;">
        <div class="clearfix"></div>

<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div>
                <div class="box-header">
                    <a  class="btn btn-warning btn-sm pull-right" onclick="printDiv('print_div')"><i class="fa fa-print"></i> Print Payslip </a>
                    <h3 class="box-title"><b>Ganesan-MAR 2022 Payslip Information : </b></h3>
                </div>
                <div class="box-body">
                   <div style="margin-left:10%;margin-right:10%;"> 
                   <?php if($totalData>0){ ?>
                    <div id="print_div" class="watermark">
                        <table style="width:100%">
                            <tr>
                                <td style="width:30%;text-align:right"><img src="assets/info-g.png" style="width:50%;" ></td>
                                <td style="text-align:center">
                                <b style="font-size:20px;">Info G Solution</b><br>    
                                293/4, MG Rd, New Fairlands, Salem-636016<br>
                                Phone : +91 99435 01501 <br>
                                Email : info@infogsolution.com.
                                    
                                </td>
                            </tr>
                        </table>
                        <center><h4>Payslip foe the Month of March 2022</h4></center>
                        <table style="width:100%">
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;" width=20%>Employee Name</td><td style="text-align:left;border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['emp_name']?></td>
                                <td style="border:1px solid black !important;padding:5px;" width=20%>Employee Code</td><td style="border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['employeeid']?></td>
                            </tr>
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;">Department</td><td style="text-align:left;border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['department_name']?></td>
                                <td style="border:1px solid black !important;padding:5px;">UAN(PF) No</td><td style="text-align:left;border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['uan_pf_no']?></td>
                            </tr>
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;">Designation</td><td style="text-align:left;border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['designation_name']?></td>
                                <td style="border:1px solid black !important;padding:5px;">ESI No</td><td style="text-align:left;border:1px solid black !important;padding:5px;">: <?=$emp_data[0]['esi_no']?></td>
                            </tr>
                        </table><br>
                        <h4><b>Leave Details</b></h4>
                        <table  style="width:100%">
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;" width="35%">Total No.of Working Days</td><td style="text-align:center;border:1px solid black !important;padding:5px;"><?=$emp_data[0]['working_days']?></td>
                                <td style="border:1px solid black !important;padding:5px;" width="35%">Total Holidays</td><td style="text-align:center;border:1px solid black !important;padding:5px;"><?=$emp_data[0]['holidays']?></td>
                            </tr>
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;">Total Permission Leaves</td><td style="text-align:center;border:1px solid black !important;padding:5px;"><?=$emp_data[0]['permission_leaves']?></td>
                                <td style="border:1px solid black !important;padding:5px;">Loss of Pay Days</td> <td style="text-align:center;border:1px solid black !important;padding:5px;">0</td>
                            </tr>
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;">Salary Processing Days</td><td style="text-align:center;border:1px solid black !important;padding:5px;"><?=$emp_data[0]['salary_processing_days']?></td>
                                <td style="border:1px solid black !important;padding:5px;">Net Salary</td><td style="text-align:center;border:1px solid black !important;padding:5px;">₹ <?=$emp_data[0]['net_salary']?></td>
                            </tr>
                           
                        </table>
                        <br>
                        <h4><b>Salary Break-Up Details</b></h4>
                        <table style="width:100%">
                            <tr>
                                <td style="border:1px solid black !important;padding:5px;" width="35%">Earnings</td>
                                <td style="border:1px solid black !important;padding:5px;" width="15%">Amount(₹)</td>
                                <td style="border:1px solid black !important;padding:5px;" width="35%">Reduction</td>
                                <td style="border:1px solid black !important;padding:5px;" width="15%">Amount(₹)</td>
                            </tr>
                            
                            <?php
                             $earning_detail=json_decode($emp_data[0]['earnings_details']);
                             $reduction_details=json_decode($emp_data[0]['reduction_details']);
                             for($i=0;$i<count($earning_detail);$i++){
                            ?>
                            <?php if($i%2==0){ ?><tr><?php } ?>
                                <td style="border:1px solid black !important;padding:5px;"><?=$earning_detail[$i][0]?></td>
                                <td style="border:1px solid black !important;padding:5px;">₹ <?=$earning_detail[$i][3]?></td>
                           
                           
                           
                                    <?php 
                                    if(count($reduction_details)>$i){
                                        echo '<td style="border:1px solid black !important;padding:5px;">'.$reduction_details[$i][0].'</td>';
                                        echo '<td style="border:1px solid black !important;padding:5px;">₹ '.$reduction_details[$i][3].'</td>';
                                    }else{
                                         echo '<td style="border:1px solid black !important;padding:5px;" colspan="2"></td>';
                                    }?>
                           <?php if($i%2==0){ ?></tr><?php } ?>
                           
                            <?php } ?>
                            
                           
                          
                            <tr>
                                <td style="text-align:right;font-weight:bold;border:1px solid black !important;padding:5px;">Total Gross Salary</td> <td style="text-align:left;font-weight:bold;border:1px solid black !important;padding:5px;">₹ <?=$emp_data[0]['earnings_total']?></td>
                                <td style="text-align:right;font-weight:bold;border:1px solid black !important;padding:5px;">Total Deduction</td> <td style="text-align:left;font-weight:bold;border:1px solid black !important;padding:5px;">₹ <?=$emp_data[0]['reduction_total']?></td>
                            </tr>
                            
                           
                        </table>
                        <table style="width:100%;padding:20px;">
                            
                            <tr>
                                 <td style="text-align:right;font-weight:bold;font-size:22px;padding-right:50px;"><br>Total CTC : ₹ <?=$emp_data[0]['total_ctc']?></td>
                                <td style="text-align:right;font-weight:bold;font-size:22px;padding-right:50px;"><br>Take Home Salary: ₹ <?=$emp_data[0]['net_pay_employee']?></td>
                            </tr>
                        </table><br><br>
                        <span style="font-size:16px;">** Note: As this an electronically generated report, it does not require the signature of the employer.</span>
                    </div>
                    <?php }else{?>
                    <center>No Data Found...</center>
                    
                    <?php } ?>
                    </div>
                </div>
        </div>
    </div>
</section>
<script>
    function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}
</script>
<style>
.watermark {
  display: block;
  position: relative;
}

.watermark::after {
  content: "";
    background: url("assets/info-g.png");
    opacity: 0.10;
    top: 70mm;
    bottom: 0mm;
    right: 100mm;
    left: 80mm;
    background-size: 400px 170px;
    background-repeat: no-repeat;
    
    text-align: center;
    position: absolute;
    /*z-index: -1; */
}
    table{
        width:100% !important;
    }
    th,td{
        padding:5px !important;
    }
    table,td,th{
        
    }
</style>
<?php include "footer.php";?>

Zerion Mini Shell 1.0