?
Current Path : /home1/savoy/public_html/savoyglobal.net/rms/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/rms/application/views/hr/edit_salary_setting.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $emplyee=$this->mastermodel->getdatas('employee','employee_id','','employee_id'); $allowdeduc = $this->mastermodel->getdatas('allowdeduc','allowdeduc_id'); $employee_salary_allowdeduc = $this->mastermodel->getdatas('employee_salary_allowdeduc','employee_salary_id'); $curency = $this->mastermodel->getdatas('finance_currency','currency_id'); ?> <div class="icons_main"> <div class="icons"> <img src="<?=base_url()?>assets/images/back.png" title="Back" class="clickimage" onclick="viewdata('hr','viewinhrsearch','search_salary_setting','view_salary_setting','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="32" height="32" /> </div> <div class="icons_caption"> <h4>UPDATE SALARY SETTINGS</h4> </div> </div> <?php $attributes=array('id'=>'validateform','class'=>'validate'); echo form_open('hr/addinhr/update_salary_setting/view_salary_setting/1',$attributes); ?> <input type="hidden" name="employee_salary_id" id="employee_salary_id" value="<?= $viewinfo->employee_salary_id ?>" /> <div class="grid_6"> <div class="box"> <div class="content no-padding"> <div class="header main"> Employee Salary Details</div> <div class="section _100"> <label>Employee Name</label> <div> <br/> <select name="employee_id" class="required" id="employee_id"> <option value="">--Select--</option> <?php foreach($emplyee as $row) { ?> <option value="<?=$row['employee_id']?>" <?php if($row['employee_id']==$viewinfo->employee_id){echo 'selected'; }?>><?=$row['employee_name']?> </option> <?php } ?> </select> </div> </div> <div class="section _100"> <label>W.F.E <br/> Date <br/></label> <div> <input class="w_90 required" type="dateonly" name="wef_date" id="wef_date" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->wef_date)?>"/> </div> </div> <div class="section _100"> <label>Basic <br/> Salary <br/></label> <div> <input class="auto w_90 required" type="text" name="basic_salary" id="basic_salary" value="<?=$viewinfo->basic_salary?>" onblur="changebasicsalary(this.value)"/> </div> </div> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="header main">Annual Ticket Settings</div> <div class="content no-padding"> <div class="section _100"> <label>From:</label> <div> <input class="w_90" type="text" name="from_ticket" id="from_ticket" value="<?=$viewinfo->from_ticket?>"/> </div> </div> <div class="section _100"> <label>To:</label> <div> <input class="w_90" type="text" name="to_ticket" id="to_ticket" value="<?=$viewinfo->to_ticket?>"> </div> </div> <div class="section _100"> <label>Return Ticket</label> <div> <input type="checkbox" name="return_ticket" value="1" <?php if($viewinfo->return_ticket=='1'){ echo 'checked="checked"' ;}?> /> </div> </div> <div class="section _100"> <label>No.of Tickets</label> <div> <input class="w_90" type="text" style="width:70px;" name="no_tickets" id="no_tickets" value="<?=$viewinfo->no_tickets?>"> </div> </div> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="header main">Bank Details </div> <div class="content no-padding"> <div class="section _100"> <label> Bank Name</label> <div> <input class="w_90" type="text" name="bank_name" id="bank_name" value="<?=$viewinfo->bank_name?>"/> </div> </div> <div class="section _100"> <label>Branch</label> <div> <input class="w_90" type="text" name="branch_name" id="branch_name" value="<?=$viewinfo->branch_name?>"/> </div> </div> <div class="section _100"> <label> Account No</label> <div> <input class="w_90" type="text" name="account_no" id="account_no" value="<?=$viewinfo->account_no?>"/> </div> </div> </div> </div> </div> <div class="grid_12"> <div class="box"> <div class="content no-padding"> <div class="header main"> Allowance/Deduction Details</div> <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 = $viewinfo->basic_salary; $dept=$this->mastermodel->get_data('allowdeduc','0','allowdeduc_type'); foreach($dept as $dep) { if($dep['allowdeduc_mode']==0) $mode="Direct Amount"; else $mode="Percentage"; ?> <tr> <td><div class="allow_dedc"><?=$dep['allowdeduc_name'];?><input type="hidden" value ="<?=$dep['allowdeduc_id'];?>" name="allowdeduc_id_<?=$i;?>"/> </div></td> <td><div class="allow_dedc"><?=$mode?></div></td> <?php $amount_allowdeduc=$this->mastermodel->get_data_dual_srow('employee_salary_allowdeduc',$dep['allowdeduc_id'],'allowdeduc_id',$viewinfo->employee_salary_id,'employee_salary_id'); if(!empty ($amount_allowdeduc)) $allowdeduc_amount = $amount_allowdeduc->amount; else $allowdeduc_amount=0; ?> <td> <input style="width:75px;float:left;" class="auto" value="<?=$allowdeduc_amount;?>" type="text" name="amount_<?=$i;?>" id="amount_<?=$i;?>" onblur="calculteallowancetotal(this.value,<?=$dep['allowdeduc_mode']?>,<?=$i?>)"/> <?php if($dep['allowdeduc_mode']==1) { ?> <div style="float:left;margin: 5px;padding-top: 10px">%</div> <?php } ?> </td> <?php if($dep['allowdeduc_mode']==1) $allototal= $allowdeduc_amount/100*$basicsalary; else $allototal=$allowdeduc_amount; $tot_allowance+= $allototal; ?> <td><input type="text" class="auto" name="alltotal_<?=$i?>" id="alltotal_<?=$i?>" value="<?=$allototal;?>" readonly /></td> <td><div class="allow_dedc">Allowance</div></td> </tr> <?php $i++; } ?> <input type="hidden" name="allowcount" id="allowcount" value="<?=$i?>" /> <?php $dept=$this->mastermodel->get_data('allowdeduc','1','allowdeduc_type'); foreach($dept as $dep) { if($dep['allowdeduc_mode']==0) $mode="Direct Amount"; else $mode="Percentage"; ?> <tr> <td> <div class="allow_dedc"><?=$dep['allowdeduc_name'];?><input type="hidden" value ="<?= $dep['allowdeduc_id'];?>" name="allowdeduc_id_<?=$i;?>"/></div> </td> <td> <div class="allow_dedc"><?=$mode?></div> </td> <?php $amount_allowdeduc=$this->mastermodel->get_data_dual_srow('employee_salary_allowdeduc',$dep['allowdeduc_id'],'allowdeduc_id',$viewinfo->employee_salary_id,'employee_salary_id'); $allowdeduc_amount = $amount_allowdeduc->amount; ?> <td> <input type="text" value="<?=$allowdeduc_amount;?>" class="auto" onblur="calcultedeductiontotal(this.value,<?=$dep['allowdeduc_mode']?>,<?=$i?>)" name="amount_<?=$i?>" id="amount_<?=$i?>" style="width:75px;float:left;"/> <?php if($dep['allowdeduc_mode']==1) { ?> <div style="float:left;margin: 5px;padding-top: 10px">%</div> <?php } ?> </td> <?php if($dep['allowdeduc_mode']==1) $dedtotal= $allowdeduc_amount/100*$basicsalary; else $dedtotal=$allowdeduc_amount; $tot_deduct += $dedtotal; ?> <td><input type="text" class="auto" name="dedtotal_<?=$i?>" id="dedtotal_<?=$i?>" value="<?=$dedtotal?>" readonly /></td> <td><div class="allow_dedc">Deduction</div></td> </tr> <?php $i++; } ?> <input type="hidden" name="dedcount" id="dedcount" value="<?=$i?>" /> </table> </div> </div> </div> <div class="grid_12"> <div class="box"> <div class="content no-padding"> <div class="header main">Salary Details</div> <table class="table" cellpadding="0" cellspacing="0" width="200px;"> <tr> <th>Allowance</th> <th>Deduction</th> </tr> <tr> <td><input type="text" class="auto" readonly style="width:80%" name="allowance" id="allowance" value="<?php echo $tot_allowance; ?>"></td> <td><input type="text" class="auto" style="width:80%" readonly name="deduction" id="deduction" value="<?php echo $tot_deduct ; ?>"></td> </tr> <tr> <th>Gross Salary</th> <th>Net Salary</th> </tr> <tr> <td><input type="text" class="auto" readonly style="width:80%" name="grosssalary" id="grosssalary" value="<?php echo $basicsalary + $tot_allowance; ?>"></td> <td><input type="text" class="auto" style="width:80%" readonly name="netsalary" id="netsalary" value="<?php echo ($basicsalary + $tot_allowance) - $tot_deduct ; ?>"></td> </tr> <tr> <th>Payment Method</th> <td> <select name="payment_method" id="payment_method" class="required chzn-done"> <option value="Cheque" <?php if($viewinfo->payment_method == "Cheque"){ echo "selected"; } ?>>Cheque</option> <option value="BankTransfer" <?php if($viewinfo->payment_method == "BankTransfer"){ echo "selected"; } ?>>Bank Transfer</option> </select> </td> </tr> </table> </div> </div> </div> <div class="grid_12"> <div class="box"> <div class="actions"> <div class="actions-left"> <input type="reset"> <input type="hidden" name="alert_limit" id="alert_limit" value="<?=$i?>"/> </div> <div class="actions-right"> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </div> </div> </div> </div> <?php echo form_close();?>