diff --git a/api/application/config/customconfig_one.php b/api/application/config/customconfig_one.php index 387abe6..90d1142 100644 --- a/api/application/config/customconfig_one.php +++ b/api/application/config/customconfig_one.php @@ -16,7 +16,7 @@ if(ENVIRONMENT == 'development' || ENVIRONMENT == 'testing') $config['token_generation_url'] = 'https://testapp.iobnet.org/iobpay/iobpayRESTService/apitokenservice/generatenewtoken/'; $config['txn_initiate_url'] = 'https://testapp.iobnet.org/iobpay/apitxninit.do'; $config['txn_status_url'] = 'https://testapp.iobnet.org/iobpay/iobpayRESTService/apitxnstatusservice/gettxnstatus/'; - $config['merchant_reply_url'] = 'https://lms.venbainfotech.com/csr/api/receiveIOBPAYResponse'; + $config['merchant_reply_url'] = 'https://lms.venbainfotech.com/csrb/api/receiveIOBPAYResponse'; $config['referer_url'] = 'https://testapp.iobnet.org'; if(ENVIRONMENT == 'development') diff --git a/api/application/models/School_requirement_model.php b/api/application/models/School_requirement_model.php index 9212cf3..bc85893 100644 --- a/api/application/models/School_requirement_model.php +++ b/api/application/models/School_requirement_model.php @@ -163,7 +163,7 @@ class school_requirement_model extends Custom_Model { // echo $no_of_schools_posted; // echo $total_amount_required; - $query = "SELECT count(distinct user_id) as supporters,ifnull(sum(amount),0) as contributed_amount,(SELECT count(distinct school_id) FROM ".CSR_SCHOOL_REQUIREMENTS.") as no_of_schools_posted,(SELECT distinct sum(STUDENTS_SCHOOL_CHILD_COUNT.total) as studets_tot_count from ".CSR_SCHOOL_REQUIREMENTS." as CSR_SCHOOL_REQUIREMENTS JOIN ".STUDENTS_SCHOOL_CHILD_COUNT." as STUDENTS_SCHOOL_CHILD_COUNT on CSR_SCHOOL_REQUIREMENTS.school_id = STUDENTS_SCHOOL_CHILD_COUNT.school_id) as students_tot_count,(SELECT sum((qty * CSR_MATERIAL_MASTER.cost_per_unit)) as required_amount FROM ".CSR_SCHOOL_REQUIREMENTS." as CSR_SCHOOL_REQUIREMENTS LEFT JOIN ".CSR_MATERIAL_MASTER." as CSR_MATERIAL_MASTER on CSR_SCHOOL_REQUIREMENTS.mat_id = CSR_MATERIAL_MASTER.id WHERE CSR_SCHOOL_REQUIREMENTS.isactive = 1) as total_amount_required FROM ".CSR_CONTRIBUTIONS." as CSR_CONTRIBUTIONS WHERE CSR_CONTRIBUTIONS.status= 'FUNDS_RECEIVED'OR CSR_CONTRIBUTIONS.status= 'MAT_RECEIVED'"; + $query = "SELECT count(distinct user_id) as supporters,ifnull(sum(amount),0) as contributed_amount,(SELECT count(distinct school_id) FROM ".CSR_SCHOOL_REQUIREMENTS.") as no_of_schools_posted,(SELECT sum(total) FROM ".STUDENTS_SCHOOL_CHILD_COUNT." where school_id in (SELECT distinct school_id FROM ".CSR_SCHOOL_REQUIREMENTS.")) as students_tot_count,(SELECT sum((qty * CSR_MATERIAL_MASTER.cost_per_unit)) as required_amount FROM ".CSR_SCHOOL_REQUIREMENTS." as CSR_SCHOOL_REQUIREMENTS LEFT JOIN ".CSR_MATERIAL_MASTER." as CSR_MATERIAL_MASTER on CSR_SCHOOL_REQUIREMENTS.mat_id = CSR_MATERIAL_MASTER.id WHERE CSR_SCHOOL_REQUIREMENTS.isactive = 1) as total_amount_required FROM ".CSR_CONTRIBUTIONS." as CSR_CONTRIBUTIONS WHERE CSR_CONTRIBUTIONS.status= 'FUNDS_RECEIVED'OR CSR_CONTRIBUTIONS.status= 'MAT_RECEIVED'"; return $this->db->query($query)->result_array()[0]; print_r($this->db->last_query()); diff --git a/api/index.php b/api/index.php index 4e40c9f..7f1cb7f 100644 --- a/api/index.php +++ b/api/index.php @@ -54,7 +54,7 @@ * NOTE: If you change these, also change the error_reporting() code below */ //define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); - define('ENVIRONMENT','development'); + define('ENVIRONMENT','testing'); date_default_timezone_set('Asia/Kolkata');