From e552dfebb7c7cd724de3215f804b7d375d133a0c Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sun, 21 Feb 2021 15:16:08 +0530 Subject: [PATCH] SMC FEEDBACK 1 --- api/application/controllers/PD_Controller.php | 12 +++--- .../helpers/smc_creditpd_helper.php | 22 ++++++----- .../views/smc_creditpd_reports/MWISE.php | 37 ++++++++++++------- 3 files changed, 42 insertions(+), 29 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 98eaeadb..45ce2512 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -1071,13 +1071,13 @@ class PD_Controller extends REST_Controller { } - if(isset($pd_details['pd_status']) && $pd_details['pd_status'] == BOUNCED || $pd_details['pd_status'] == TRIGGERED) - { + //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); - } - - + //} + // echo 'after'; + // print_r($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); @@ -11094,7 +11094,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $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) + if($is_mwise_lender && (($pd_details['pd_status'] == TRIGGERED) || ($pd_details['pd_status'] == ALLOCATED))) { $regional_credit_manager = $this->PD_Model->getRCM($pd_details['fk_city']);//pass pd address city as param if(count($regional_credit_manager)) diff --git a/api/application/helpers/smc_creditpd_helper.php b/api/application/helpers/smc_creditpd_helper.php index 3222dce7..61c2ae08 100644 --- a/api/application/helpers/smc_creditpd_helper.php +++ b/api/application/helpers/smc_creditpd_helper.php @@ -72,22 +72,26 @@ class smc_creditpd $person_met = ''; foreach ($json['borrower_details'] as $key => $value) { - - if(isset($value['borrower_met']) && !strcasecmp($value['borrower_met'],'yes')) - { - $person_met .= $value['borrower_name'].', '; - } - + $mobile_numbers = ''; if(isset($value['mobile_numbers']) && count($value['mobile_numbers'])) { - $mobile_numbers = ''; + foreach ($value['mobile_numbers'] as $k => $smn) { if((count($value['mobile_numbers']) - 1) == $k){$mobile_numbers .= ($smn['mobile_no']); break;} - $mobile_numbers .= ($smn['mobile_no'].' - '); + $mobile_numbers .= ($smn['mobile_no'].','); } $json['borrower_details'][ $key ] ['mobile_numbers'] = $mobile_numbers; } + + if(isset($value['borrower_met']) && !strcasecmp($value['borrower_met'],'yes')) + { + $temp_person_met = $value['borrower_name']; + $temp_person_met .= ($mobile_numbers != '' ? '(' .$mobile_numbers. ') ,': ','); + $person_met .= $temp_person_met; + } + $mobile_numbers = ''; + } // if(!isset($json['person_met'])) // { @@ -99,7 +103,7 @@ class smc_creditpd if(substr_count($person_met,',')) { - $person_met = substr_replace($person_met,' and ',strpos($person_met,','),2); + $person_met = substr_replace($person_met,' and ',strrpos($person_met,','),2); } } diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php index 6ad7fb54..8615da73 100644 --- a/api/application/views/smc_creditpd_reports/MWISE.php +++ b/api/application/views/smc_creditpd_reports/MWISE.php @@ -215,7 +215,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Name of Person Met During Visit + Name of Person Met During Visit and Contact Number @@ -452,7 +452,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Addess of property - + + Stage of construction @@ -784,7 +785,7 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re } ?> - + There is no other business asset available '; @@ -793,12 +794,14 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re ?> - +
Business Assets Remarks - '.$pd_section_data[8]['common_remarks'].'
'; + //echo '

Business Assets Remarks - '.$pd_section_data[8]['common_remarks'].'
'; + echo ' Business Assets Remarks - '.$pd_section_data[8]['common_remarks'].' '; }?> - + +
@@ -807,7 +810,7 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re - + @@ -1034,7 +1037,7 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re '?> - ';}?> + '; } + if(isset($pd_section_data[10]['common_remarks']) && !empty($pd_section_data[10]['common_remarks'])) + { + echo ''; + } + ?> @@ -1070,20 +1078,21 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re - + ';} + else if(isset($pd_section_data[11]['supplier_not_available_reason']) && $pd_section_data[11]['supplier_not_available_reason'] != ''){ + echo '';} else { echo ''; } if(isset($pd_section_data[11]['common_remarks']) && !empty($pd_section_data[11]['common_remarks'])){ - echo '';} + echo '';} ?> +
Financial Information
Name of the Company / Firm whose financials are noted Turn Over for Broken Period in CY '.$rupee_symbol.''. MYUTIL::customIndianNumberFormat($pd_section_data[10]['broken_period_turnover_cy']).'Turn Over for Broken Period in PY '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($pd_section_data[10]['broken_period_turnover_py']).' ('.$uparrow.'/'. $downarrow.')in Turnover for Broken Period '.$pd_section_data[10]['broken_period_turnover_percent'].'%
Remarks on Financials >> '.$pd_section_data[10]['common_remarks'].'
Finance Data Not Available
Remarks on Financials '.$pd_section_data[10]['common_remarks'].'
Supplier Information Not available. Reason - '.$pd_section_data[11]['supplier_not_available_reason'] .'
Supplier Information Not available. Reason - '.$pd_section_data[11]['supplier_not_available_reason'] .'
Supplier Information Not available
Remarks - '.$pd_section_data[11]['common_remarks'] .'
Remarks - '.$pd_section_data[11]['common_remarks'] .'
@@ -1111,7 +1120,7 @@ if(isset($pd_section_data[11]['common_remarks']) && !empty($pd_section_data[11][ Client Information Not available. Reason - '.$pd_section_data[12]['client_not_available_reason'] .'';} else { @@ -1160,7 +1169,7 @@ if(isset($pd_section_data[12]['common_remarks']) && !empty($pd_section_data[12][ echo ''.( ucfirst($pd_section_data[13]['estimated_uom']) ) .''; } } - else if(isset($pd_section_data[13]['stock_not_available_reason'])) + else if(isset($pd_section_data[13]['stock_not_available_reason']) && $pd_section_data[13]['stock_not_available_reason'] != '') { echo 'Stock Information Not available. Reason - '.$pd_section_data[13]['stock_not_available_reason'] .''; }