?
Current Path : /home1/savoy/public_html/savoyglobal.net/sibs_draft/system/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/sibs_draft/system/application/views/HR/editstaffsalary.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?> <script type="text/javascript" src="<?= base_url() ?>/assets/js/autonumeric.js"></script> <script> jQuery(document).ready(function () { $('.one').datepick({dateFormat: 'dd-mm-yyyy'}); $("input.autop").autoNumeric({ mNum: 2, mDec: 0 }); $("input.auto").autoNumeric(); showpaydetails(); }); function hideRows() { document.getElementById('netbankdetails').style.display="none"; document.getElementById('bankdetails').style.display="none"; // document.getElementById('modepayment').style.display="none"; // document.getElementById('labelDDNo').style.display="none"; document.getElementById('labelDDNo1').style.display="none"; } function showpaydetails() { var mode=document.getElementById('paymethod').value; ; if ( mode=='bank') { // if(mode=='bank') // { // // hideRows(); // document.getElementById('bankdetails').style.display="block"; // document.getElementById('labelDDNo').style.display="block"; // // // } // else // { hideRows(); document.getElementById('netbankdetails').style.display="block"; document.getElementById('bankdetails').style.display="block"; document.getElementById('labelDDNo1').style.display="block"; // } } else if (mode=='credit') { hideRows(); document.getElementById('modepayment').style.display="block"; } else { hideRows(); } } </script> <?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ foreach ($viewinfo as $updata) { $staffid = $updata['staffid']; $date = $updata['date']; $basicsalary = $updata['basicsalary']; $staffsalaryid = $updata['id']; $premiumtarget = $updata['premiumtarget']; $commission = $updata['commission']; $paymode = $updata['paymethod']; $currency = $updata['currencytype']; } $paymodes = $this->customermodel->getSingleFieldValue('payment_methods', 'methods', 'method', $updata['paymethod']); $currname = $this->customermodel->getSingleFieldValue('country', 'currencycode', 'id', $currency); $stf = $this->mastermodel->get_data_srow('staffpersonaldetails', $staffid, 'id'); $allowance = $this->mastermodel->get_data('allowdeduc', 'Allowance', 'allowdeductype'); $deduction = $this->mastermodel->get_data('allowdeduc', 'Deduction', 'allowdeductype'); $allowded = $this->mastermodel->get_data('staffsalaryallowdeduc', $staffsalaryid, 'staffsalaryid'); $date = $this->mastermodel->convdatformat($date); ?> <div class="select-bar"> <label> <img src="<?= base_url() ?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loadstaffsalary('<?= $_SESSION['pagenum'] ?>','<?= $_SESSION['searchoption'] ?>','<?= $_SESSION['searchtxt'] ?>')" alt="Back" align = "center" width="25" height="25" /> </label> </div> <fieldset> <legend>Update Staff-Salary</legend> <?php $attributes = array('id' => 'customForm'); echo form_open('hr/editstaffsalary', $attributes); echo form_hidden('staffsalaryid', $staffsalaryid); ?> <ul> <li> <label for="date">Employee Name</label> <input type="text" id="employee" size="20" value="<?= $stf->name; ?>"> <input type="hidden" name="employee_id" id="employee_id" value="<?= $staffid; ?>"> <img id="inliexample1" src="<?= base_url() ?>/assets/images/button-search.png" title="Search" class="clickimage" onclick="showstaffdiv()" > <span id="staffnameInfo" class="red_bold">*</span> </li> <?php $stfper = $this->mastermodel->get_data_srow('staffpersonaldetails', $staffid, 'id'); $stfemp = $this->mastermodel->get_data_srow('staffemployeedetails', $staffid, 'staffid'); $desg = $this->mastermodel->get_data_srow('designation', $stfemp->designationid, 'id'); $dept = $this->mastermodel->get_data_srow('department', $stfemp->deptid, 'id'); $bank_info=$this->mastermodel->get_data_srow('salarybank', $staffsalaryid, 'sal_id'); $acc_no=''; $branch=''; $acc_holder=''; $bank_name=''; if(!empty($bank_info)){ $acc_no=$bank_info->acc_no; $branch=$bank_info->branch_name; $acc_holder=$bank_info->ch_dep_no; $bank_name=$bank_info->bank_name; } if (!empty($desg) || !empty($dept)) { $designation = $desg->designation; $department = $dept->departmentname; } else { $designation = ""; $department = ""; } ?> <li id="stfinfodet"> <fieldset> <ul><li><label>Employee No</label><label><?= $stfper->employeeid; ?></label></li> <li><label>Designation</label><label><?= $designation; ?></label></li> <li><label>Department</label><label><?= $department; ?></label></li> </ul> </fieldset> </li> <li> <label>Date</label> <input class="one" name="date" id="date" readonly="true" value="<?= $date; ?>" type="text" style="background-image: url(../../../../assets/images/datefocus.gif);"> <span id="dateInfo" class="red_bold">*</span> </li> <li></li> <li> <label>Basic Salary</label> <input type="text" id="basicsalary" name="basicsalary" size="20" class="auto" onblur="changebasicsalary(this.value)" value="<?= $basicsalary; ?>" /> <select name="currencytype" id="currencytype" > <option value="<?= $currency ?>" ><?= $currname ?></option> <?php $currency_type = $this->mastermodel->getdatas('country'); foreach ($currency_type as $key => $list) { echo "<option value='" . $list['id'] . "'>" . $list['currencycode'] . "</option>"; } ?> </select><span id="currencytypeInfo" class="red_bold">*</span> </li> <li> <table class="sort" cellpadding="0" cellspacing="0" align="left" > <caption>Allowance/Deduction Details</caption> <thead> <tr> <th>Title</th> <th>Mode</th> <th>Amount/Percentage</th> <th>Sub Total</th> <th>Type</th> </tr> </thead> <tbody> <?php $i = 1; $allowanceamt = 0; foreach ($allowance as $all) { $allowdeducname = $this->mastermodel->get_data_dual_srow('staffsalaryallowdeduc', $all['id'], 'allowdeducid', $staffsalaryid, 'staffsalaryid'); if (!empty($allowdeducname)) { $amount = $allowdeducname->amount; } else { $amount = 0; } if ($all['mode'] == 1) { $mode = "Direct Amount"; $sf = 1; $tamount = $amount * $sf; $subtotal = $tamount; } else { $mode = "Percentage"; $sf = 0.01; $tamount = $amount * $sf; $subtotal = $basicsalary * $tamount; } ?> <tr> <td ><?= $all['allowdeducname']; ?><input type="hidden" value ="<?= $all['id']; ?>" name="allowid_<?= $i; ?>"></td> <td><?= $mode ?></td> <td> <input type="text" onblur="calculteallowancetotal(this.value,<?= $all['mode'] ?>,<?= $i ?>)" name="newpolicy_<?= $i ?>" value="<?= $amount ?>" id="newpolicy_<?= $i ?>" style="width:80%" <?php if ($all['mode'] == 1) { ?> class="auto" <?php } else { ?> class="autop" <?php } ?> /> <?php if ($all['mode'] == 0) { echo '%'; } ?> </td> <td><input type="text" name="alltotal_<?= $i ?>" id="alltotal_<?= $i ?>" value="<?= $amount ?>" readonly /></td> <td>Allowance</td> </tr> <?php $allowanceamt += $amount; $i++; } ?> <input type="hidden" name="allowcount" id="allowcount" value="<?= $i ?>" /> <?php $i = 1; $deducamt = 0; foreach ($deduction as $ded) { $allowdeducname = $this->mastermodel->get_data_dual_srow('staffsalaryallowdeduc', $ded['id'], 'allowdeducid', $staffsalaryid, 'staffsalaryid'); if (!empty($allowdeducname)) { $amount = $allowdeducname->amount; } else { $amount = 0; } if ($ded['mode'] == 1) { $mode = "Direct Amount"; } else { $mode = "Percentage"; } ?> <tr> <td><?= $ded['allowdeducname']; ?><input type="hidden" value ="<?= $ded['id']; ?>" name="deducid_<?= $i; ?>"/></td> <td><?= $mode ?></td> <td><input type="text" onblur="calcultedeductiontotal(this.value,<?= $ded['mode'] ?>,<?= $i ?>)" name="newpolicy1_<?= $i ?>" value="<?= $amount ?>" id="newpolicy1_<?= $i ?>" style="width:80%" <?php if ($ded['mode'] == 1) { ?> class="auto" <?php } else { ?> class="autop" <?php } ?> /> <?php if ($ded['mode'] == 0) { echo '%'; } ?> </td> <td><input type="text" name="dedtotal_<?= $i ?>" id="dedtotal_<?= $i ?>" value="<?= $amount ?>" readonly /></td> <td>Deduction</td> </tr> <?php $i++; $deducamt += $amount; } ?> <input type="hidden" name="dedcount" id="dedcount" value="<?= $i ?>" /> </tbody> </table> </li> <li> <table class="sort" cellpadding="0" cellspacing="0" align="left" > <caption>Salary Details</caption> <tr> <th>Allowance</th> <th>Deduction</th> </tr> <tr> <td><input type="text" readonly style="width:80%" name="allowance" id="allowance" value="<?= $allowanceamt ?>"></td> <td><input type="text" style="width:80%" readonly name="deduction" id="deduction" value="<?= $deducamt ?>"></td> </tr> <?php $grosssalary = $basicsalary + $allowanceamt; $netsalary = $grosssalary - $deducamt; ?> <tr> <th> Gross Salary </th> <th> Net Salary </th> </tr> <tr> <td><input type="text" readonly style="width:80%" name="grosssalary" id="grosssalary" value="<?= $grosssalary ?>"></td> <td><input type="text" style="width:80%" readonly name="netsalary" id="netsalary" value="<?= $netsalary ?>"></td> </tr> </table> </li> <li> <div id="paydiv" style="float: left;width:50%"> <table> <tr id="payment_meth"> <td> <label style="color:#000;">Payment Method</label> <select id="paymethod" name="paymethod" onchange="showpaydetails()"> <option value="<?= $paymode ?>"><?= $paymodes ?></option> <?php foreach ($methods as $meth) { if ($meth['method'] != 'credit' && $meth['method'] != $paymode) { echo "<option value=" . $meth['method'] . " >" . $meth['methods'] . "</option>"; } } ?> </select> <span id="paymethodInfo" class="red_bold">*</span> <td> </tr> <tr><td></td></tr> <?php if($paymode=="bank"){ ?> <tr style="display:none" id="bankdetails" > <td> <label id="labelDDNo1" style="color:#000;">Account Holder</label> <input type="text" id="acc_holder" value="<?=$acc_holder?>" name='acc_holder'> </td> <td> <label style="color:#000;">Bank Name</label> <input type="text" value="<?=$bank_name?>" id="bank_name" name='bank_name'> </td> </tr> <tr style="display:none" id="netbankdetails" > <td> <label style="color:#000;">Account Number</label> <input type="text" value="<?=$acc_no?>" id="acc_no" name='acc_no' > </td> <td> <label style="color:#000;">Branch Name</label> <input type="text" value="<?=$branch?>" id="branch_name" name='branch_name'> </td> </tr> <?php } ?> </table> <input type="hidden" name="last_method" id="last_method" value="<?= $paymode ?>"/> </div> </li> <li> <fieldset> <legend>Medical Insurance Settings</legend> <input name="addRows" value="Add More" onclick="addRowToTableMedical();" title="Add more ." type="button"> <input name="deleteRows" value="Remove" onclick="removeRowFromTableMedical();" title="Delete last" type="button"> <table class="sort" id="addmed" border="0" cellpadding="0" cellspacing="0" width="60%"> <tbody><tr class="red_bold" align="left" valign="top"> <th width="10%">Type Of Insurance</th> <th width="20%">Insurance Company</th> <th width="18%">Policy No</th> <th width="12%">Plan Name</th> <th width="12%">Sum Insured</th> </tr> <?php $id = 1; foreach ($medical as $med) { ?> <tr class="bold_black" align="left" valign="top"> <td><input name="txt_conType_<?= $id ?>" id="txt_conType_<?= $id ?>" value="<?= $med['type'] ?>" style="width: 100px;" type="text"> <input name="hid_conCnt" id="hid_conCnt" value="3" type="hidden"></td> <td><input name="txt_conIns_<?= $id ?>" id="txt_conIns_<?= $id ?>" value="<?= $med['company'] ?>" style="width: 150px;" type="text"></td> <td><input name="txt_conPol_<?= $id ?>" id="txt_conPol_<?= $id ?>" value="<?= $med['policy'] ?>" style="width: 80px;" type="text"></td> <td><input name="txt_conPlan_<?= $id ?>" id="txt_conPlan_<?= $id ?>" value="<?= $med['plan'] ?>" style="width: 200px;" type="text"></td> <td><input name="txt_conSum_<?= $id ?>" id="txt_conSum_<?= $id ?>" value="<?= $med['sum'] ?>" style="width: 100px;" type="text"></td> </tr> <input name="hided_<?= $id ?>" id="hided_<?= $id ?>" value="<?= $med['id'] ?>" type="hidden"> <?php $id++; } ?> </tbody> </table> </fieldset> </li> <li> <label for="submit"> </label> <button type="submit" class="clickimage" id="submit" onclick="return doallthetwo();">Update</button> </li> </ul> <?php echo form_close(); ?> </fieldset>