File: /home/cafsindia/hrms_allyindian_com/application_bk/controllers/Allowance_summary.php
<?php if ( ! defined('BASEPATH')) exit('No direct script is allowed');
require_once("Action_controller.php");
class Allowance_summary extends Action_controller{
public function __construct(){
parent::__construct('allowance_summary');
}
// LOAD PAGE QUICK LINK,FILTERS AND TABLE HEADERS
public function index(){
$data["allowance_list"] = array("" => "Select Type","1" => "Food Allowance","2" => "1st Shift Allowance","3" => "2nd Shift Allowance","4" => "Overtime Allowance",);
$data['key'] = $this->generateKey();
$this->load->view("$this->control_name/manage",$data);
}
//FUNCTION FOR GET A ALLOWANCE ELIGIBILITY COUNT DETAILS
public function get_allowance_summary(){
$encString = file_get_contents('php://input');
$_POST = $this->cryptoDecrypt($encString);
if(!$_POST){
echo json_encode(array('success' => false,'message' => 'Url Expired.. Please refresh the page and try again....','table_data' => ""));
exit(0);
}
$allowance_type = (int)$this->input->post('allowance_type');
$process_month = $this->input->post('process_month');
$info = $this->db->query("CALL sp_allowance_eligible_count ($allowance_type,'$process_month')");
$result = $info->result_array();
$info->next_result();
if($result){
echo json_encode(array('success' => TRUE, 'message' => "Successfully Generated.!",'return_arr' => $result));
}else{
echo json_encode(array('success' => FALSE, 'message' => "No Data Found.!"));
}
}
}
?>