?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/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/sec/application/views/hr/manage_salary_payment.php |
<!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <?php $this->load->view('header'); $this->load->view('commonfunctions'); $this->load->view('hr/hrfunctions'); ?> </head> <body class="page-header-fixed"> <?php $this->load->view('top'); ?> <!-- BEGIN CONTAINER --> <div class="page-container row-fluid" > <!-- BEGIN PAGE --> <div class="page-sidebar nav-collapse collapse"> <!-- BEGIN SIDEBAR MENU --> <?php $this->load->view('menu'); ?> <!-- END SIDEBAR MENU --> </div> <!-- END SIDEBAR --> <!-- BEGIN PAGE --> <div class="page-content"> <!-- BEGIN PAGE CONTAINER--> <div class="container-fluid"> <!-- BEGIN PAGE HEADER--> <div class="row-fluid"> <div class="span12"> <!-- BEGIN PAGE TITLE & BREADCRUMB--> <h3 class="page-title"> <?= $_SESSION['menu_name']; ?> </h3> <ul class="breadcrumb"> <li> <i class="icon-home"></i> <?= $_SESSION['module_title']; ?> <i class="icon-angle-right"></i> </li> <li><a href="#"><?= $_SESSION['menu_name']; ?></a></li> <li class="pull-right no-text-shadow"> </li> </ul> <!-- END PAGE TITLE & BREADCRUMB--> </div> </div> <!-- END PAGE HEADER--> <div id="view_msg"></div> <!-- BEGIN PAGE CONTENT--> <div id="inner_content"> </div> <!-- END PAGE CONTENT--> <div class="clearfix"></div> </div> </div> <!-- END PAGE CONTAINER--> </div> <!-- END PAGE --> <!-- END CONTAINER --> <?php $this->load->view('footer'); $this->load->view('commonjsfiles'); ?> <script src="<?= base_url() ?>assets/scripts/jquery.autocomplete.js"></script> <script src="<?= base_url() ?>assets/scripts/autonumeric.js"></script> <script type="text/javascript"> $(document).ready(function() { viewdata('hr','viewinhrsearch','search_salary_payment','view_salary_payment','1'); App.init(); }); 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 loadallempsalary() { var date=document.getElementById('date').value; if (date == '') { alert("Please Select Date First"); $('#allemp').attr('checked', false); return false; } else { $('#date').attr('disabled', 'disabled'); document.getElementById("singleempdiv").style.display="none"; document.getElementById("salary_box").style.display="none"; $("#salpay").empty().html('<CENTER><img src="<?= base_url() ?>/assets/img/loading.gif" class="loading"/></CENTER>'); $("#salpay").load("<?= site_url('hr/load_all_employee_salary_payment/') ?>/"+date); } } function loadsingleempsalary() { var date=document.getElementById('date').value; if (date == '') { alert("Please Select Date First"); $('#singlemp').attr('checked', false); return false; } else { $('#date').attr('disabled', 'disabled'); document.getElementById("singleempdiv").style.display="block"; $("#salpay").empty().html(""); suggestemployeesalarypayment(date); } } function suggestemployeesalarypayment(date) { // alert($("#employee1").val()) $("#employee").autocomplete("<?= site_url() ?>/hr/autosuggestemployeesalarypayment/"+date, { width: 250, selectFirst: false }); } function load_employee_salary_details() { var date = $('#date').val(); var employee_id = $('#employee_id').val(); if(employee_id == "") { alert("Please select Employee First"); } else { $('#date').attr('disabled', 'disabled'); document.getElementById("salary_box").style.display="block"; $("#salary_box").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#salary_box").load("<?= site_url() ?>/hr/load_employees_salary/"+employee_id+'/'+date); } } function viewsalaryslip(employee_id,salary_date) { var type = 'popup'; if (salary_date == '') { alert("Please Select Date First"); return false; } else { $.ajax({ type: "POST", url: "<?= site_url('hr/checksalarymonth') ?>", data: "id="+employee_id+"&date="+salary_date, success: function(msg) { if(msg=='salary_exists') { alert('Pay slip already generated for this employee in this month') } else if(msg =='salary_not_set') { alert('Salary Not Set') $("#empdiv").empty(); } else { $("#empdiv").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#empdiv").load("<?= site_url('hr/load_employees_salary') ?>/"+employee_id+"/"+salary_date+"/" + type); } } }); } } function checksalarymonthind(count) { checkallcheckbox(); var date=document.getElementById('date').value; if (date == '') { alert("Please Select Date First"); $("input#salempdet_"+count).attr('checked', false); return false; } else { var empid= $("input#salempdet_"+count).val(); $.ajax({ type: "POST", url: "<?= site_url('hr/checksalarymonth') ?>", data: "id="+empid+"&date="+date, success: function(msg) { if(msg=='salary_exists') { alert('Pay slip already generated for this employee in this month') $("input#salempdet_"+count).attr('checked', false); } else if(msg =='salary_not_set') { alert('Salary Not Set') $("input#salempdet_"+count).attr('checked', false); } } }); } } function viewsalarydetails(employee_id,index){ var type = 's'; var saldetails=$('#staff_'+employee_id+' td').html(); var salary_date=document.getElementById('date').value; if (salary_date == '') { alert("Please Select Date First"); return false; } else { if(saldetails==""){ $.ajax({ type: "POST", url: "<?= site_url('hr/checksalarymonth') ?>", data: "id="+employee_id+"&date="+salary_date, success: function(msg) { if(msg=='salary_exists') { alert('Pay slip already generated for this employee in this month') } else if(msg =='salary_not_set') { alert('Salary Not Set') $("#staff_"+index).empty(); } else { // $("#staff_"+index).empty().html('<CENTER><img src="<?= base_url() ?>assets/images/loading.gif" class="loading"/></CENTER>'); // $("#staff_"+index).load("<?= site_url('hr/load_employees_salary') ?>/"+employee_id+"/"+salary_date+"/" + type); // alert("<?= site_url('hr/load_employees_salary') ?>/"+employee_id+"/"+salary_date+"/" + type); // $(".inliexample1").colorbox({width:"75%",height:"70%", inline:true, href:"#empdiv"}); $('#salempdet_'+index).attr('checked','checked'); $('#staff_'+employee_id).toggle(); if($('#staff_'+employee_id).css('display')=="none"){ $('#minus_'+employee_id).attr('src','<?= base_url() ?>/assets/img/add1.png') }else{ $('#minus_'+employee_id).attr('src','<?= base_url() ?>/assets/img/minus.png') } $.ajax({ type: "POST", url: "<?= site_url('hr/load_employees_salary_selected') ?>/"+employee_id+"/"+salary_date+"/" + type, data: "id="+employee_id+"&date="+salary_date, success: function(msg) { $('#staff_'+employee_id+' ').html('<td colspan="7">'+msg+'</td>'); } }); } } }); } else{ $('#staff_'+employee_id).toggle(); if($('#staff_'+employee_id).css('display')=="none"){ $('#minus_'+employee_id).attr('src','<?= base_url() ?>/assets/img/add1.png') }else{ $('#minus_'+employee_id).attr('src','<?= base_url() ?>/assets/img/minus.png') } } } } </script> <!-- END FOOTER --> </body> <!-- END BODY --> </html>