?
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/staffsettlement.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?> <?php $this->load->view('header'); $this->load->view('HR/hrfunctions'); ?> <script type="text/javascript"> $(document).ready(function(){ //Display Loading Image // generatesalarysettlemnt(1); staffsettlement('1','1','emp_settlement.id',''); }); function post_settlement(id,pagenum,searchoption,searchtext){ $("#salarypaymentdiv").load("<?= site_url('hr/post_sal_settlement') ?>" +"/" + id+ "/" + pagenum+"/" + searchoption + "/" + searchtext); // $.ajax({ // type: "POST", // url: "<?= site_url('hr/post_settlement') ?>", // data: "id="+id, // success: function(msg) // { // if(msg==1) // { // // staffsettlement(posted,pagenum,searchoption,searchtext); // return false; // }else{ // alert('Failed to post Salary Settlement'); // return false; // } // } // }); } function staffsettlement(posted,pagenum,searchoption,searchtext){ $("#salarypaymentdiv").empty().html('<CENTER><img src="<?= base_url() ?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#salarypaymentdiv").load("<?= site_url('hr/viewsettlement/get_settlement/') ?>/"+posted+"/"+pagenum+'/'+searchoption+'/'+searchtext); } // function generatesalarysettlemnt(rwd) // { // $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) // { // if(data==1) // { // $("#salarypaymentdiv").empty().html('<CENTER><img src="<?= base_url() ?>/assets/images/loading.gif" class="loading"/></CENTER>'); // $("#salarypaymentdiv").load("<?= site_url('hr/ajaxload/generatesalarysettlement/emp_settlement') ?>",function(){ // // $('#button1').attr('disabled', 'disabled'); // // }); // } // }); // } function viewsingle_sal_settlement(val,pageno,field,text) { $("#staffsaldetdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#staffsaldetdiv").load("<?= site_url('hr/viewsingle_sal_settlement/') ?>" +"/" + val+ "/" + pageno+"/" + field + "/" + text); $(".slslip").colorbox({width:"75%",height:"90%", inline:true, href:"#staffsaldetdiv"}); } function showstaffdiv() { var mydate = document.getElementById('date').value; if (mydate == '') { alert("Please Select Date First"); return false; } else { $("#staffsdiv").empty().html('<CENTER><img src="<?= base_url() ?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#staffsdiv").load("<?= site_url('sales/ajaxload/searchstaff/staffpersonaldetails/') ?>"); $("#inliexample1").colorbox({width:"75%",height:"70%", inline:true, href:"#staffsdiv"}); } } function searchStaff(serctext,seloption,pagenum) { $('#stafflist').load("<?php echo site_url('hr/listSearchstaff/'); ?>/"+pagenum+ "/"+ seloption + "/" + serctext); } function checkstaff(){ var emp_name=$('#employee').val(); var emp_id=$('#employee_id').val(); var mydate = $('#date').val(); if(mydate==""){ alert("Select Date"); } else if(emp_name=="" || emp_id==""){ alert("Select Employee"); } else{ usestaff(emp_name,emp_id) } } function usestaff(staffname,id) { var mydate = document.getElementById('date').value; $.ajax({ type: "POST", url: "<?= site_url('hr/checksalarymonthforsettlement') ?>", data: "id="+id+"&date="+mydate, success: function(msg) { if(msg=='no') { alert('Salary Not Set') return false; } else { $("#salpay").empty().html("<img src='<?= base_url() ?>/assets/images/loading.gif'/>"); $("#salpay").load("<?= site_url('hr/ajaxloadsalpay/list_sal_settlement/') ?>" +"/" +id+"/"+mydate); } } }); } function clear_div(div,element){ $('#'+div).empty(); $('#'+element).val(''); } function insertsinglesalarypayment() { if(validateform('rel_date')){ $('#customForm').ajaxForm({ // beforeSubmit: showPreloaderform('loading'), success: function(data) { alert(data); // alert('Salary Settlement Processed Successfully'); // $.fn.colorbox.close(); // hidePreloaderform('loading'); // generatesalarysettlemnt(1); }, error: function(data) { alert(data)} }); } else{ return false; } } function add_settlement(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#salarypaymentdiv").load("<?= site_url('hr/add_sal_settlement') ?>"); } }); } function edit_settlement(rwd,val,pageno,field,text) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#salarypaymentdiv").load("<?= site_url('hr/edit_sal_settlement') ?>" +"/" + val+ "/" + pageno+"/" + field + "/" + text); } }); } function single_settlement(rwd,val,pageno,field,text) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#salarypaymentdiv").load("<?= site_url('hr/single_sal_settlement') ?>" +"/" + val+ "/" + pageno+"/" + field + "/" + text); } }); } function insert_bank_accounts() { var acc_code=document.getElementById('chartgroup_name15').value ; var acc_name=document.getElementById('acc_name').value ; var acc_no=document.getElementById('acc_no').value; var acc_type=document.getElementById('acc_type').value; var bank_curr=document.getElementById('bank_curr').value; var bank_add=document.getElementById('bank_add').value; var bank_name=document.getElementById('bank_name').value; if(validateform('chartgroup_name15','acc_name')) { $.post("<?php echo site_url('accounting/insertbank_acc/'); ?>", { 'acc_code':acc_code,'acc_name':acc_name,'acc_type':acc_type,'acc_no':acc_no,'bank_curr':bank_curr,'bank_add':bank_add,'bank_name':bank_name }, function(data) { alert(data); show_bank_acc(1,'bank_account_name',''); }); } } </script> <body > <div id="main"> <?php $this->load->view('menu'); ?> <div id="middle"> <?php $this->load->view('leftbar'); ?> <div id="center-column"> <?php $this->load->view('topbar'); ?> <div class="table"> <div id="successdiv" align="center"></div> <p> </p> <div id="salarypaymentdiv"> </div> <div style='display:none'> <div id='staffsdiv' style='padding:10px; background:#fff;'> </div> </div> <div id="loading" align="center"></div> </div> </div> </div> <?php $this->load->view('footer'); ?> </div> </body> </html>