?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/application/views/ |
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/sgms/application/views/hrfunctions.php |
<script type="text/javascript"> function calculteallowancetotal(val,mode,count) { var basicsalary=$("input#basic_salary").val(); if(!basicsalary) { alert("Please set basic salary") } 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") } 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>