diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 2665d001..8de16f33 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -1022,7 +1022,7 @@ class PD_Controller extends REST_Controller { /***********************CHOOSE PD TEMPALATE*********************/ $pd_details['fk_pd_template_id'] = $this->assignPDTempalate($pd_details['pd_id']); //echo $pd_details['fk_pd_template_id']; - $pd_details = $this->smcStuffs($pd_details); + } @@ -1062,6 +1062,16 @@ class PD_Controller extends REST_Controller { $pd_details['cancel_pd_remark'] = $pd_details['remark']; unset($pd_details['remark']); } + + + if(isset($pd_details['pd_status']) && $pd_details['pd_status'] == BOUNCED || $pd_details['pd_status'] == TRIGGERED) + { + //implement smc related stuffs + $pd_details = $this->smcStuffs($pd_details,$exist_pd_details); + } + + + // die(); $where_condition_array = array('pd_id' => $pd_details['pd_id'],'random_string' => $pd_details['random_string']); $pd_id_modified = $this->PD_Model->updateRecords($pd_details,PDTRIGGER,$where_condition_array); // print_r($this->db->last_query()); @@ -1081,14 +1091,7 @@ class PD_Controller extends REST_Controller { $id = $this->PD_Model->updateRecords($temp_data,PDADDRESS,$where_condition_array); } - - if(isset($pd_details['pd_status']) && $pd_details['pd_status'] == BOUNCED) - { - //implement smc related stuffs - $pd_details = $this->smcStuffs($pd_details,$exist_pd_details); - } - - + if($pd_id_modified != null || $pd_id_modified != '' && $count != 0) { @@ -11081,7 +11084,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() // $addresses[0]['fk_city'] = 3374; $mwise_lender_id = (ENVIRONMENT == 'production' ? 7 : 35); - $is_mwise_lender = ( $pd_details['fk_lender_id'] == $mwise_lender_id ? true : false); + $current_lender_id = (isset($pd_details['fk_lender_id']) && $pd_details['fk_lender_id'] != '' ? $pd_details['fk_lender_id'] : $existing_pd_details[0]['fk_lender_id']) ; + $is_mwise_lender = ( $current_lender_id == $mwise_lender_id ? true : false); // echo !$is_mwise_lender; if($is_mwise_lender && $pd_details['pd_status'] == TRIGGERED) { @@ -11105,7 +11109,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() //find current user role $this->load->model('User_Management_Model'); $this->load->model('SMC_Credit_PD_Model'); - $user_details = $this->User_Management_Model->getUserDetails($createdby); + $user_details = $this->User_Management_Model->getUserDetails($pd_details['fk_updatedby']); if($user_details['data'][0]['user_role'] == 26)//Credit Manager { //get RCM and allocate to RCM @@ -11143,6 +11147,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() } + // echo $pd_details['fk_pd_allocated_to'];die(); return $pd_details; } diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php index 093c1ffb..eb9a1454 100644 --- a/api/application/views/smc_creditpd_reports/MWISE.php +++ b/api/application/views/smc_creditpd_reports/MWISE.php @@ -805,6 +805,8 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re Financial Information + + Name of the Company / Firm whose financials are noted @@ -1032,6 +1034,17 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re Remarks on Financials >> '.$pd_section_data[10]['common_remarks'].' ';}?> + + + Finance Data Not Available'; + } + + + ?>