?
Current Path : /home1/savoy/public_html/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/public_html/savoyglobal.net/eduplus2/application/views/hr/hrfunctions.php |
<script type="text/javascript"> function load_employee_details(id) { $("#employee").load("<?= site_url() ?>"+'/hr/load_employee_details/' +id); } function checkallcheckbox() { $('#checksalempdet').removeAttr('checked'); $('input[name^=salempdet]').each(function() { if ($(this).is(':checked')) { $('#checksalempdet').attr('checked', 'checked'); } }); if ($('#checksalempdet').is(':checked')) $('#button1').removeAttr('disabled'); else $('#button1').attr('disabled', 'disabled'); } function loadPaymentMethod(val, divid) { if (val > 1) { $('#payment_method_div').css('display', 'table-cell') $("#" + divid).empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#" + divid).load("<?= site_url('hr/load_payment_method') ?>/" + val); } else { $("#" + divid).html(""); } } function calculteallowancetotal(val,mode,count) { var basicsalary=$("input#basic_salary").val(); if(!basicsalary) { alert("Please set basic salary") $('input#amount_'+count).val(''); } else { if(mode==0) { val=parseFloat(basicsalary)*parseFloat(val)*0.01; } $('input#alltotal_'+count).val(val); var allowcount=$("input#allowcount").val(); var deduction=$("input#deduction").val(); var sumallow=0; for(var i=1;i<allowcount;i++) { var allowamount=$("input#alltotal_"+i).val(); if(allowamount) sumallow+=parseFloat(allowamount); } $('input#allowance').val(sumallow); var commission=$("input#commission").val(); var grosssalary=parseFloat(sumallow)+parseFloat(basicsalary); var netsalary=parseFloat(grosssalary)-parseFloat(deduction); var payamount=parseFloat(netsalary)+parseFloat(commission); $('input#grosssalary').val(grosssalary); $('input#netsalary').val(netsalary); $('input#payamount').val(payamount); } } function calcultedeductiontotal(val,mode,count) { var basicsalary=$("input#basic_salary").val(); if(!basicsalary) { alert("Please set basic salary"); $("input#amount_"+count).val(''); } else { if(mode==0) { val=parseFloat(basicsalary)*parseFloat(val)*0.01; } $("input#dedtotal_"+count).val(val); var dedcount=$("input#dedcount").val(); var allowance=$("input#allowance").val(); var sumded=0; for(var i=1;i<dedcount;i++) { var dedamount=$("input#dedtotal_"+i).val(); if(dedamount) sumded+=parseFloat(dedamount); } $('input#deduction').val(sumded); var commission=$("input#commission").val(); var grosssalary=parseFloat(allowance)+parseFloat(basicsalary); var netsalary=parseFloat(grosssalary)-parseFloat(sumded); var payamount=parseFloat(netsalary)+parseFloat(commission); $('input#grosssalary').val(grosssalary); $('input#netsalary').val(netsalary); $('input#payamount').val(payamount); } } function changebasicsalary(val) { var allowance=$("input#allowance").val(); var deduction=$("input#deduction").val(); var grosssalary=parseFloat(allowance)+parseFloat(val); var netsalary=parseFloat(grosssalary)-parseFloat(deduction); $('input#grosssalary').val(grosssalary); $('input#netsalary').val(netsalary); } function calculatepayamount(commission_amount) { var netsalary=$("input#netsalary").val(); var payamount=parseFloat(netsalary)+parseFloat(commission_amount); $('input#payamount').val(payamount); } </script>