MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/login_cafsindia_com/application/controllers/Health_renewal_due_report.php
<?php if ( ! defined('BASEPATH')) exit('No direct script is allowed');
require_once("Action_controller.php");
class Health_renewal_due_report  extends Action_controller{	
	public function __construct(){
		parent::__construct('health_renewal_due_report');
		$this->collect_base_info();
	}
	
	// LOAD PAGE QUICK LINK,FILTERS AND TABLE HEADERS
	public function index(){
		$this->load->view("$this->control_name/manage",$data);
	}
	public function health_renewal_report(){
		$date	=	$this->input->post('date');
		$health_renewal_qry    = 'SELECT proposer_name,contact_number,due_date,current_policy_no AS policy_number,net_premium,alter_contact_number,
		cw_health_company.company_name,login_date,total_premium,cw_health_product.product_name,cw_payment_mode.payment_mode
		FROM cw_health_renewals
		INNER JOIN cw_payment_mode ON cw_payment_mode.prime_payment_mode_id=cw_health_renewals.payment_mode
		INNER JOIN cw_health_company ON cw_health_company.prime_health_company_id=cw_health_renewals.company
		INNER JOIN cw_health_product ON cw_health_product.prime_health_product_id=cw_health_renewals.product
		WHERE DATE_FORMAT(cw_health_renewals.due_date,"%m-%Y") ="'.$date.'" AND cw_health_renewals.trans_status=1 ORDER BY due_date';
		$renewal_report_info   = $this->db->query("CALL sp_a_run ('SELECT','$health_renewal_qry')");
		$renewal_report_rslt   = $renewal_report_info->result_array();
		$renewal_report_info->next_result();
		if($renewal_report_rslt){
			echo json_encode(array('success' => TRUE,'message' => "Renewal Details",'renewal_report' => $renewal_report_rslt));
		}else{
			echo json_encode(array('success' => FALSE,'message' => "No Data Available",'renewal_report' => array()));
		}
	}
	
}
?>