?
Current Path : /home1/savoy/public_html/savoyglobal.net/futuredraft/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/futuredraft/application/views/hr/manage_salary_payment.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <html class="no-js" lang="en"> <head> <?php $this->load->view('jsfiles'); $this->load->view('header'); $this->load->view('commonfunctions'); ?> <script type="text/javascript"> $(document).ready(function() { viewdata('hr','viewinhrsearch','search_salary_payment','view_salary_payment','1'); }); 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/images/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/images/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') { parent.$.fn.colorbox.close(); alert('Pay slip already generated for this employee in this month') } else if(msg =='salary_not_set') { alert('Salary Not Set') parent.$.fn.colorbox.close(); $("#empdiv").empty(); } else { $("#empdiv").empty().html('<CENTER><img src="<?=base_url()?>assets/images/loading.gif" class="loading"/></CENTER>'); $("#empdiv").load("<?= site_url('hr/load_employees_salary') ?>/"+employee_id+"/"+salary_date+"/" + type); $(".inliexample1").colorbox({width:"75%",height:"70%", inline:true, href:"#empdiv"}); } } }); } } 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); } } }); } } </script> </head> <body> <div id="height-wrapper"> <?php $this->load->view('menu'); ?> <div role="main" class="container_12" id="content-wrapper"> <div id="main_content"> <?php $this->load->view('top'); ?> <div id="inner_content"> </div> </div> <div class="push clear"></div> </div> <div class="clear"></div> <div class="push"></div> </div> <?php $this->load->view('footer'); ?> </body> </html>