?
Current Path : /home1/savoy/www/savoyglobal.net/eduplus2/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/www/savoyglobal.net/eduplus2/application/views/hr/add_single_posted_salary_payment.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $this->load->view('hr/hrfunctions'); $attributes=array('id'=>'validateform1','class'=>'customForm'); echo form_open('hr/addinhr/insert_single_posted_salary_payment/view_payslip/1',$attributes); $p_type=array('cash'=>'1','cheque'=>'2','bank'=>'3'); ?> <script type="text/javascript"> function close_modal() { $('#payment_vouchar_div').modal('hide'); } $(document).ready(function(){ $('#close_modal').click(function(){ close_modal(); return true; }); }); </script> <script> loadPaymentMethod(<?=$p_type[strtolower($salpay->payment_method)]?>, 'payment_method_div'); </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i> Employee Salary Details</div> <div class="tools"> <a href="#" id="close_modal" class="remove"></a> </div> </div> <div class="portlet-body form"> <input type="hidden" name="salary_date" value="<?=$salpay->salary_date?>"/> <input type="hidden" name="empaccount" value="<?=$salpay->employee_no?>"/> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Employee Name:</label> <div class="controls"><span class="text bold"> <?= $salpay->employee_name; ?></span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Employee No: </label> <div class="controls" ><span class="text bold"> <?= $salpay->employee_no; ?></span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Designation:</label> <div class="controls"><span class="text bold"> <?= $salpay->designation_name; ?> </span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Salary Date: </label> <div class="controls" > <input type="text" name="wef_date" id="wef_date" value="<?= $wef_date ?>" readonly="readonly"/> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Basic Salary:</label> <div class="controls"> <input type="hidden" name="employee_salary_slip_id" value="<?= $salpay->employee_salary_slip_id; ?>"/> <label for="data">Basic Salary</label> <input type="text" name="basic_salary" style="width: 250px;" readonly id="basic_salary" value="<?= $salpay->basic_salary; ?>" class="required auto" onblur="changebasicsalary(this.value)"/> </div> </div> </div> </div> <br/><br/> <h3 class="form-section">Allowance/Deduction Details</h3> <table class="table table-striped table-hover table-bordered"> <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><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?><input type="hidden" value ="<?=$mode;?>" name="mode_id_<?=$i;?>"/></div></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=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']==0) { ?> <div style="float:left;margin: 5px;padding-top: 10px">%</div> <?php } ?> </td> <?php if($dep['allowdeduc_mode']==0) $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','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><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><input type="hidden" value ="<?=$mode;?>" name="mode_id_<?=$i;?>"/></td> <td><input type="text" class="auto" onblur="calcultedeductiontotal(this.value,<?=$dep['allowdeduc_mode']?>,<?=$i?>)" name="amount_<?=$i?>" value="<?=$allowdeduc_amount;?>" id="amount_<?=$i?>" style="width:75px;float:left;"/> <?php if($dep['allowdeduc_mode']==0) { ?> <div style="float:left;margin: 5px;padding-top: 10px">%</div> <?php } ?> </td> <?php if($dep['allowdeduc_mode']==0) $dedtotal= $allowdeduc_amount/100*$basicsalary; else $dedtotal=$allowdeduc_amount; $tot_deduct += $dedtotal; ?> <td><input type="text" class="auto" name="alltotal_<?=$i?>" id="dedtotal_<?=$i?>" value="<?=$dedtotal;?>" readonly /></td> <td><div class="allow_dedc">Deduction</div></td> </tr> <?php $i++; } ?> <?php ?> <input type="hidden" name="dedcount" id="dedcount" value="<?=$i?>" /> </table> <br/><br/> <h3 class="form-section">Salary Details</h3> <table class="table table-striped table-hover table-bordered"> <tr> <th>Allowance</th> <th>Deduction</th> <th>Gratuity</th> </tr> <tr> <td><input type="text" readonly style="width:80%" class="auto" name="allowance" id="allowance" value="<?php echo $tot_allowance; ?>"></td> <td><input type="text" style="width:80%" readonly class="auto" name="deduction" id="deduction" value="<?php echo $tot_deduct ; ?>"></td> <td> <input type="text" style="width:80%" 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%" class="auto" name="grosssalary" id="grosssalary" value="<?php echo $basicsalary + $tot_allowance; ?>"></td> <td><input type="text" style="width:80%" readonly class="auto" name="netsalary" id="netsalary" value="<?php echo ($basicsalary + $tot_allowance) - $tot_deduct ; ?>"></td> <td><input type="text" readonly style="width:80%" class="auto" name="payamount" id="payamount" value="<?php echo ($basicsalary + $tot_allowance) - $tot_deduct +$salpay->commission_amount; ?>"></td> </tr> </table> <br/><br/> <h3 class="form-section">Payment Details</h3> <table class="table table-striped table-hover table-bordered"> <tr> <th width="40%">Memo</th> <th width="40%">From Account</th> <th>Payment Method</th> </tr> <tr> <td> <?php $data = array( 'name' => 'memo', 'id' => 'memo', 'style' => 'width:300px;height:80px', ); echo form_textarea($data).form_error($data); ?> </td> <td> <select name="bank_account_code" id="bank_account_code" class="required chzn-done" style="width:160px"> <option value="">Select</option> <?php $bankacc=$this->mastermodel->getdatas('finance_bank_account'); if(count($bankacc)) { foreach ($bankacc as $key => $acc) { echo "<option value='".$acc['chart_account_code']. "' >" .$acc['chart_account_code'].'-'. $acc['bank_name'] . "</option>"; } } ?> </select> </td> <td> <?php $payment_method = $this->mastermodel->getdatas('finance_payment_types'); ?> <select name="payment_type_id" id="payment_type_id" class="required" style="width:160px" onchange="loadPaymentMethod(this.value, 'payment_method_div')"> <?php if (count($payment_method)) { foreach ($payment_method as $key => $acc) { echo "<option value='" . $acc['payment_type_id'] . "'";if(strtolower($acc['payment_type'])==strtolower($salpay->payment_method)) echo "selected"; echo " >" . $acc['payment_type'] . "</option>"; } } ?> </select> </td> </tr> </table> <div id="payment_method_div"> </div> <input type="hidden" name="employee_salary_slip_id" id="employee_salary_slip_id" value="<?= $salpay->employee_salary_slip_id ?>" /> <input type="hidden" name="tab_name" value="employee_salary_slip"/> <input type="hidden" name="employee_id" value="<?= $salpay->employee_id ?>"/> <div class="form-actions"> <button type="submit" class="btn blue" id="button1" onclick="addformdata('validateform1','staffsaldetdiv')">Post</button> </div> <?php echo form_close();?> </div> </div> </div> </div>