From a14f994a2cb635c327c18ba1b3ffef3a4e379a2b Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 21 Feb 2020 13:11:19 +0530 Subject: [PATCH] GET COMPANY DETAILS UNEXP DIE REMOVED --- api/application/controllers/PD_Controller.php | 6 +++--- api/application/models/PD_Model.php | 20 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 92177c19..af7929be 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -4695,7 +4695,7 @@ public function getPDFormDetailsJSON_post() // } // else // { - $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); + $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => ($data['pd_master_details'][0]['sub_entity_id'] ? $data['pd_master_details'][0]['sub_entity_id'] : $data['pd_master_details'][0]['fk_lender_id']))); //} //$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); @@ -5993,7 +5993,7 @@ public function getPDFormDetailsJSON_post() // else // { //echo 'NOR'; - $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); + $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => ($data['pd_master_details'][0]['sub_entity_id'] ? $data['pd_master_details'][0]['sub_entity_id'] : $data['pd_master_details'][0]['fk_lender_id']))); //} //print_r($data['lender_disclaimer']);die(); //$GLOBALS['footer_lender_disclaimer'] = $data['lender_disclaimer'][0]['type'] == 2 ? $data['lender_disclaimer'][0]['disclaimer'] : (isset($data['lender_disclaimer'][1]) && $$data['lender_disclaimer'][1]['type'] == 2 ? $$data['lender_disclaimer'][1]['disclaimer'] : ''); @@ -6376,7 +6376,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $this->db->WHERE('PDFORMDETAILSJSON.company_id',$company['company_order_id']); $this->db->WHERE('PDFORMDETAILSJSON.isactive',1); $template_forms_count = $this->db->GET()->result_array(); - print_r($this->db->last_query());die(); + //print_r($this->db->last_query());die(); } else diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index b84cabe0..881bf1a9 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -1895,8 +1895,8 @@ class PD_Model extends SPARQ_Model { { // check CLIX group - this script for is lender is whether clix or clix housing, then have to bring both lender contact persons, otherwise pull contact persons belongs to single entity - $is_lenderid_clix_group = ENVIRONMENT == 'production' && ($lender_id == 5 || $lender_id == 9) ? true : (($lender_id == 16 || $lender_id == 38) ? true : false); - $clix = ENVIRONMENT == 'production' ? 5 : 16;$clixhousing = ENVIRONMENT == 'production' ? 9 : 38; + // $is_lenderid_clix_group = ENVIRONMENT == 'production' && ($lender_id == 5 || $lender_id == 9) ? true : (($lender_id == 16 || $lender_id == 38) ? true : false); + // $clix = ENVIRONMENT == 'production' ? 5 : 16;$clixhousing = ENVIRONMENT == 'production' ? 9 : 38; // check CLIX group $this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as user_name,USERPROFILE.fk_entity_id,USERPROFILE.fk_city,USERPROFILEROLES.user_role,USERPROFILE.fk_entity_type_id,ROLES.role_name,if( POSITION("credit" IN ROLES.role_name),"CREDIT","SALES") as role_type'); @@ -1908,15 +1908,15 @@ class PD_Model extends SPARQ_Model { $this->db->join(USERPROFILEROLES. ' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive =1'); $this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role'); //$this->db->where('USERPROFILE.fk_city',$pd_branch_id); - if(!$is_lenderid_clix_group) - { + // if(!$is_lenderid_clix_group) + // { $this->db->where('USERPROFILE.fk_entity_id',$lender_id); - } - else - { - $this->db->where('USERPROFILE.fk_entity_id',$clix); - $this->db->or_where('USERPROFILE.fk_entity_id',$clixhousing); - } + // } + // else + // { + // $this->db->where('USERPROFILE.fk_entity_id',$clix); + // $this->db->or_where('USERPROFILE.fk_entity_id',$clixhousing); + // } if($pd_branch_id) {