?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/draft/application/views/hr/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sec/draft/application/views/hr/viewpostedsalpay.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); // $this->load->view('documentreadyfunctions'); // $this->load->view('hrfunctions'); $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('#',$attributes); $allowdeduc = $this->mastermodel->getdatas('allowdeduc','allowdeduc_id'); $employee_salary_allowdeduc = $this->mastermodel->getdatas('employee_salary_slip_allowdeduc','employee_salary_slip_id'); $curency = $this->mastermodel->getdatas('finance_currency','currency_id'); ?> <fieldset> <input type="hidden" name="salary_date" value="<?=$salpay->salary_date?>"/> <div class="grid_12" style="width: 98%"> <div class="box"> <div class="header main"> Employee Salary Details</div> <div class="content no-padding"> <div class="section _100"> <label>Employee Name</label> <div class="single_page"> <?=$salpay->employee_name;?> </div> </div> <div class="section _100"> <label>Employee No</label> <div class="single_page"> <?=$salpay->employee_no;?> </div> </div> <div class="section _100"> <label>Designation</label> <div class="single_page"> <?=$salpay->designation_name;?> </div> </div> <div class="section _100"> <label>Basic Salary</label> <div class="single_page"> <?=number_format($salpay->basic_salary);?> </div> </div> </div> </div> </div> <br/><br/> <div class="grid_12" style="width: 98%"> <div class="box"> <div class="header main">Allowance/Deduction Details</div> <div class="content no-padding"> <table class="table"> <tr> <th align="center">Title</th> <th align="center">Mode</th> <th align="center">Amount/Percentage</th> <th align="center">Sub Total</th> <th align="center">Type</th> </tr> <?php $i=1; $tot_allowance=0; $tot_deduct =0; $basicsalary = $salpay->basic_salary; $dept=$this->mastermodel->get_data('allowdeduc','1','allowdeduc_type'); foreach($dept as $dep) { if($dep['allowdeduc_mode']==1) $mode="Direct Amount"; else $mode="Percentage"; ?> <tr> <td><?=$dep['allowdeduc_name'];?><input type="hidden" value ="<?=$dep['allowdeduc_id'];?>" name="allowdeduc_id_<?=$i;?>"/> </td> <td><?=$mode?></td> <?php $amount_allowdeduc=$this->mastermodel->get_data_dual_srow('employee_salary_slip_allowdeduc',$dep['allowdeduc_id'],'allowdeduc_id',$salpay->employee_salary_slip_id,'employee_salary_slip_id'); if(!empty ($amount_allowdeduc)) $allowdeduc_amount = $amount_allowdeduc->amount; else $allowdeduc_amount=1; ?> <td><input style="width:75px;text-align: right;" class="auto" readonly value="<?=$allowdeduc_amount;?>" type="text" name="amount_<?=$i;?>" id="amount_<?=$i;?>" onblur="calculteallowancetotal(this.value,<?=$dep['allowdeduc_mode']?>,<?=$i?>)" /> <?php if($dep['allowdeduc_mode']==0) echo '%'; ?> </td> <?php if($dep['allowdeduc_mode']==0) $allototal= $allowdeduc_amount/100*$basicsalary; else $allototal=$allowdeduc_amount; $tot_allowance+= $allototal; ?> <td><input type="text" style="text-align: right;" class="auto" name="alltotal_<?=$i?>" id="alltotal_<?=$i?>" value="<?=$allototal;?>" readonly /></td> <td>Allowance</td> </tr> <?php $i++; } ?> <input type="hidden" name="allowcount" id="allowcount" value="<?=$i?>" /> <?php $dept=$this->mastermodel->get_data('allowdeduc','0','allowdeduc_type'); foreach($dept as $dep) { if($dep['allowdeduc_mode']==1) $mode="Direct Amount"; else $mode="Percentage"; ?> <?php $allowdeduc_amount=0; $amount_allowdeduc=$this->mastermodel->get_data_dual_srow('employee_salary_slip_allowdeduc',$dep['allowdeduc_id'],'allowdeduc_id',$salpay->employee_salary_slip_id,'employee_salary_slip_id'); if(!empty ($amount_allowdeduc)) $allowdeduc_amount = $amount_allowdeduc->amount; if($dep['allowdeduc_mode']==0) $allototal= $allowdeduc_amount/100*$basicsalary; else $allototal=$allowdeduc_amount; ?> <tr> <td><?=$dep['allowdeduc_name'];?> <input type="hidden" value ="<?= $dep['allowdeduc_id'];?>" name="allowdeduc_id_<?=$i;?>"/> </td> <td><?=$mode?></td> <td><input type="text" class="auto" readonly onblur="calcultedeductiontotal(this.value,<?=$dep['allowdeduc_mode']?>,<?=$i?>)" name="amount_<?=$i?>" value="<?=$allowdeduc_amount;?>" id="amount_<?=$i?>" style="width:75px;text-align: right;"/> <?php if($dep['allowdeduc_mode']==0) echo '%'; ?> </td> <?php if($dep['allowdeduc_mode']==0) $dedtotal= $allowdeduc_amount/100*$basicsalary; else $dedtotal=$allowdeduc_amount; $tot_deduct += $dedtotal; ?> <td><input type="text" style="text-align: right;"class="auto" name="dedtotal_<?=$i?>" id="dedtotal_<?=$i?>" value="<?=$dedtotal;?>" readonly /></td> <td>Deduction</td> </tr> <?php $i++; } ?> <input type="hidden" name="dedcount" id="dedcount" value="<?=$i?>" /> </table> </div> </div> </div> <div class="grid_12" style="width: 98%"> <div class="box"> <div class="header main">Salary Details</div> <div class="content no-padding"> <table class="table" cellpadding="0" cellspacing="0" width="200px;"> <tr> <th>Allowance</th> <th>Deduction</th> <th>Gratuity</th> </tr> <tr> <td><input type="text" readonly style="width:80%;text-align: right;" class="auto" name="allowance" id="allowance" value="<?php echo $tot_allowance; ?>"></td> <td><input type="text" style="width:80%;text-align: right;" readonly class="auto" name="deduction" id="deduction" value="<?php echo $tot_deduct ; ?>"></td> <td> <input type="text" style="width:80%;text-align: right;" readonly class="auto" name="commission" class="auto" onblur="calculatepayamount(this.value)" id="commission" value="<?=$salpay->commission_amount?>"></td> </tr> <tr> <th>Gross Salary</th> <th>Net Salary</th> <th>Pay Amount</th> </tr> <tr> <td><input type="text" readonly style="width:80%;text-align: right;" class="auto" name="grosssalary" id="grosssalary" value="<?php echo $basicsalary + $tot_allowance; ?>"></td> <td><input type="text" style="width:80%;text-align: right;" readonly class="auto" name="netsalary" id="netsalary" value="<?php echo ($basicsalary + $tot_allowance) - $tot_deduct ; ?>"></td> <td><input type="text" readonly style="width:80%;text-align: right;" class="auto" name="payamount" id="payamount" value="<?php echo ($basicsalary + $tot_allowance) - $tot_deduct +$salpay->commission_amount; ?>"></td> </tr> </table> </div> </div> </div> </fieldset> <?php echo form_close();?>