EVOLUTION-NINJA
Edit File: pay_slip.php
<link rel="stylesheet" href="<?php echo base_url('admin_assets/assets/font-awesome/4.5.0/css/font-awesome.min.css');?>" /> <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="<?php echo base_url('admin_assets/toastr/toastr.min.css');?>"> <script src="<?php echo base_url('admin_assets/event/assets/js/jquery-3.1.1.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/event/assets/js/bootstrap.min.js');?>"></script> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script src="<?php echo base_url('admin_assets/toastr/toastr.min.js');?>"></script> <link rel='shortcut icon' type='image/x-icon' href="<?php echo base_url('admin_assets/favicon.png');?>" /> <html> <head> <title>Pay slip</title> </head> <body> <div class="" style="width: 800px;display: table-cell;display: block;margin: auto;float: left;"> <h2 style="text-align:center;">Pay slip <?php echo date('F'); ?> - <?php echo date('Y'); ?></h2> <table border="1" class="my_table" style="width:100%;border-collapse: collapse;"> <tr> <td style="width:25%;">Employee no</td> <td style="width:25%;"><input type="type" id="myInput1" value="<?php echo $emp->employee_id; ?>"/></td> <td style="width:25%;">Name</td> <td style="width:25%;"><input type="type" id="myInput2" value="<?php echo $emp->first_name.' '.$emp->last_name; ?>" /></td> </tr> <tr> <td>Location</td> <td><input type="location" id="myInput3" value="<?php echo $emp->location; ?>"/></td> <td>Month</td> <td><input type="type" id="myInput4" value="<?php echo date('F Y'); ?>"/></td> </tr> <tr> <td>Department</td> <td><input type="text" id="myInput5" value="<?php echo $emp->department_name; ?>"/></td> <td>STD days</td> <td><input type="type" id="myInput6" value="<?php echo date('t').' '.'days'; ?>"/></td> </tr> <tr> <td>Designation</td> <td><input type="type" id="myInput7" value="<?php echo $emp->designation_name; ?>" style="width:100%;"/></td> <td>Worked days</td> <td><input type="type" id="myInput8" value="<?php echo date('t').' '.'days'; ?>" /></td> </tr> <tr style="height:30px;"> <td></td> <td></td> <td></td> <td></td> </tr> <tr style="height:30px;"> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td>Earnings</td> <td><input type="type" id="myInput9" value="<?php echo number_format($emp->earning); ?>" /></td> <td>Deduction in Rs</td> <td><input type="type" id="myInput10" value="<?php echo number_format($emp->deduction); ?>" /></td> </tr> <tr> <td>Basic</td> <td><input type="type" id="myInput11" value="<?php echo number_format($emp->basic); ?>"/></td> <td></td> <td></td> </tr> <tr> <td>HRA</td> <td><input type="type" id="myInput12" value="<?php echo number_format($emp->hra); ?>"/></td> <td></td> <td></td> </tr> <tr> <td>CA</td> <td><input type="type" id="myInput13" value="<?php echo number_format($emp->ca); ?>"/></td> <td></td> <td></td> </tr> <tr> <td>Professional tax</td> <td><input type="type" id="myInput14" value="<?php echo number_format($emp->prof_tax); ?>"/></td> <td></td> <td></td> </tr> <tr> <td>Special allowance</td> <td><input type="type" id="myInput15" value="<?php echo number_format($emp->special_allowance); ?>"/></td> <td></td> <td></td> </tr> <tr style="height:30px;"> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td>Gross earnings</td> <td><input type="type" id="myInput16" value="<?php echo number_format($emp->gross_earning); ?>"/></td> <td>Gross deduction</td> <td><input type="type" id="myInput17" value="<?php echo number_format($emp->gross_deduction); ?>"/></td> </tr> <tr style="height:30px;"> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td>Net Pay</td> <td><input type="type" id="myInput18" value="<?php echo number_format($emp->net_pay); ?>"/></td> </tr> </table> <h4>Ajay Kumar H S</h4> <h4>CEO</h4> <div class="row_6" style="text-align:center;padding-top:50px;"> <button type="button" style="background:blue;color:#fff;" class="print">Print</button> <!-- <button type="submit" style="background:blue;color:#fff;" id="submit">Save</button> --> </div> </div> <div class="" style="display: table-cell;width: 100px;"> <div style="width:100px; float:left;padding-left: 30px;padding-top: 30px;"> <a href="<?php echo site_url('employee-list');?>" style="color:blue;"><i class="fa fa-long-arrow-left fa-2x arro_w"></i></a> </div> </div> </body> </html> <style> .my_table td { padding:5px; } </style> <script type="text/javascript"> $('.print').click(function(){ $('.print').toggle(); $('#submit').toggle(); $('.arro_w').hide(); var myInput1 = document.getElementById("myInput1").style; myInput1.borderStyle="none"; var myInput2 = document.getElementById("myInput2").style; myInput2.borderStyle="none"; var myInput3 = document.getElementById("myInput3").style; myInput3.borderStyle="none"; var myInput4 = document.getElementById("myInput4").style; myInput4.borderStyle="none"; var myInput5 = document.getElementById("myInput5").style; myInput5.borderStyle="none"; var myInput6 = document.getElementById("myInput6").style; myInput6.borderStyle="none"; var myInput7 = document.getElementById("myInput7").style; myInput7.borderStyle="none"; var myInput8 = document.getElementById("myInput8").style; myInput8.borderStyle="none"; var myInput9 = document.getElementById("myInput9").style; myInput9.borderStyle="none"; var myInput10 = document.getElementById("myInput10").style; myInput10.borderStyle="none"; var myInput11 = document.getElementById("myInput11").style; myInput11.borderStyle="none"; var myInput12 = document.getElementById("myInput12").style; myInput12.borderStyle="none"; var myInput13 = document.getElementById("myInput13").style; myInput13.borderStyle="none"; var myInput14 = document.getElementById("myInput14").style; myInput14.borderStyle="none"; var myInput15 = document.getElementById("myInput15").style; myInput15.borderStyle="none"; var myInput16 = document.getElementById("myInput16").style; myInput16.borderStyle="none"; var myInput17 = document.getElementById("myInput17").style; myInput17.borderStyle="none"; var myInput18 = document.getElementById("myInput18").style; myInput18.borderStyle="none"; window.print(); }); </script>