diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 97f50f69..7b3ebcce 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -772,7 +772,7 @@ class PD_Controller extends REST_Controller { // $client = new \GuzzleHttp\Client(); // $response = $client->post($url); - SMS_GUPSHUP::sendSMS($msg,$no); + SMS_GUPSHUP::sendSMS($msg,$no,array('pd_id' => $pd_details['pd_id'],'status' => 'STARTED','msg' => 'Started OTP msg from PD controlller')); } @@ -7030,7 +7030,7 @@ class PD_Controller extends REST_Controller { if(count($pd_data)) { - $report_data = file_get_contents($this->external_path.'/pd_reports/'.$pd_data[0]['pd_id'].'/'.$pd_data[0]['pd_report_html_filename']); + $report_data = file_get_contents($this->external_path.'/pd_reports/'.$pd_data[0]['pd_id'].'/'.$pd_data[0]['pd_report_html_filename'].'.html'); $temp_file_path = APPPATH.'views/pd_reports/'. $pd_data[0]['pd_id'] .'/temp.html'; if(!file_exists($temp_file_path)) diff --git a/api/application/helpers/inlinephototransform_helper.php b/api/application/helpers/inlinephototransform_helper.php index 030a5588..12454ec9 100644 --- a/api/application/helpers/inlinephototransform_helper.php +++ b/api/application/helpers/inlinephototransform_helper.php @@ -129,7 +129,7 @@ class INLINEPHOTOTRANSFORM $temp_base64_string = $base64; $title = $doc_name; - $external_path = $CI->config->item('extrenal_data_path'); + $external_path = $CI->config->item('external_data_path'); $output_file = $external_path."/pd_reports/". $pd_details[0]['pd_id'] ."/temp_base64_image.jpeg"; EXTERNAL_DIR_CHECK::checkExternalDirectory($pd_details[0]['pd_id']); diff --git a/api/application/helpers/pdscore_helper.php b/api/application/helpers/pdscore_helper.php index 5b0b668f..f39367ba 100644 --- a/api/application/helpers/pdscore_helper.php +++ b/api/application/helpers/pdscore_helper.php @@ -524,7 +524,7 @@ class PDSCORE $vintage_of_business_account_for_display = explode('.',($score_questions['business']['vintage_of_business_account'])); - $vintage_of_business_account_for_display = ($vintage_of_business_account_for_display[0] != 0 ? $vintage_of_business_account_for_display[0].' Yrs ' : '') . ($vintage_of_business_account_for_display[1] != 0 ? $vintage_of_business_account_for_display[1].' Mns ' : ''); + $vintage_of_business_account_for_display = ($vintage_of_business_account_for_display[0] != 0 ? $vintage_of_business_account_for_display[0].' Yrs ' : '') . (isset($vintage_of_business_account_for_display[1]) && $vintage_of_business_account_for_display[1] != 0 ? $vintage_of_business_account_for_display[1].' Mns ' : ''); $score_questions['business']['vintage_of_business_account'] = array('l1_weightage' => $l1_business,'l2_weightage' => ($business_activity_has_seen_L2),'answer' => $vintage_of_business_account_for_display,'attributed_score' => ($vintage_of_business_account_actual_score), 'max_score' => ($vintage_of_business_account_max_score),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $score_band,'max_score_band' => max($vintage_of_business_account)); /*-----------END OF BUSINESS SECTION -----------*/ diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 3f04c951..ef4c4511 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -2221,14 +2221,16 @@ defined('BASEPATH') OR exit('No direct script access allowed'); 0){ $getEachValues['is_od_cc'] = null; foreach($businessBankRow['banking_details'] as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $getEachValues['is_od_cc'] = true; } } @@ -2236,14 +2238,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $bankingResult = array_merge($bankingResult,$getEachValues); } + } ?> Business Banking:'; + if($is_business_banking_available != null){ ?> - if(count($bankingResult)>0){ ?> -

Business Banking:

@@ -2310,13 +2313,17 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $to_no_of_clients = 0; $done_on_credit = 0; $name_of_the_company = ''; + $is_client_details_available = null; if(isset($pd_processed_forms[2][$business_count])) { - $cRow = $pd_processed_forms[2][$business_count]; - $clientRow = json_decode($cRow['processed_json'],true); - - $client_form_remarks = isset($clientRow['supplier_info_form_remark']) ? $clientRow['supplier_info_form_remark'] : ''; - $name_of_the_company = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1); + $cRow = $pd_processed_forms[2][$business_count]; + $clientRow = json_decode($cRow['processed_json'],true); + $client_form_remarks = isset($clientRow['supplier_info_form_remark']) ? $clientRow['supplier_info_form_remark'] : ''; + if(isset($clientRow['client_info_available']) && $clientRow['client_info_available'] == 1) + { + $is_client_details_available = 1; + + $name_of_the_company = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1); // $bindEachResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1); // $getmanufacturing = array(); // $getTrading=array(); @@ -2461,6 +2468,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to']? '' :'' ; } + } } } @@ -2480,7 +2488,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Client Details"; - if($to_no_of_clients > 0 ) + if($is_client_details_available != null) { @@ -2571,14 +2579,18 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // $supplierResult=array(); $supplier_form_remarks = ''; + $is_supplier_details_avaialable = null; if(isset($pd_processed_forms[1][$business_count])) { - $supplier_details = $pd_processed_forms[1][$business_count]; + $supplier_details = $pd_processed_forms[1][$business_count]; $supplierRow = json_decode($supplier_details['processed_json'],true); - //print_r($supplierRow);die(); + $supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : ''); + if(isset($supplierRow['supplier_info_available']) && $supplierRow['supplier_info_available'] == 1) + { + $is_supplier_details_avaialable = 1; $company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1); //$supplierResult['company_name'] = $company_name; $total_no_of_suppliers = 0; @@ -2737,14 +2749,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); array_push($supplierResult,$temp); //} - //} + }//} } } // echo "dsfnsdkfnj**********"; //print_r($supplierResult);die(); echo '

Supplier Details

' ; - if($total_no_of_suppliers > 0) + if($is_supplier_details_avaialable != null) { ?> @@ -3052,7 +3064,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');

Future Plan and Business Environment

'. $service_product['service_provider_product_credit_days_from'].' to '. $service_product['service_provider_product_credit_days_to'].' days'.' NIL
- + $oaRow) { $otherAssetRow = json_decode($oaRow['processed_json'],true); - //print_r($otherAssetRow); - //echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@"; $other_assest_common_remrks = $otherAssetRow['assets_form_remark']; + if(isset($otherAssetRow['asset_info_available']) && $otherAssetRow['asset_info_available'] == 1) + { + $is_personal_info_available = 1; + if(count($otherAssetRow['assets_details'])>0){ $otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']); //print_r($otherAssetResult); } + } } ?>

Personal Assets

0){ ?> + if($is_personal_info_available != null){ ?>
Details Particulars
Particulars Details
@@ -3502,23 +3518,26 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $ibRow) { $individualBankRow = json_decode($ibRow['processed_json'],true); - //print_r($individualBankRow); $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) + { + if(count($individualBankRow['banking_details'])>0){ $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']); $bankingResult = array_merge($bankingResult,$getIndividualEachValues); } + } } ?>

Personal Banking:

- 0){ +

Below bank account details were shared :

@@ -3551,8 +3570,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
'.$ind_banking_common_remarks.'

'; } - } ?> + + } + + if($ind_banking_common_remarks != ''){echo '

'.$ind_banking_common_remarks.'

'; } ?> @@ -3564,18 +3585,22 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // $otherIncomeResult=array(); + $is_other_income_available = null; foreach($pd_processed_forms[9] as $rowKey=> $iRow) { $otherIcomeRow = json_decode($iRow['processed_json'],true); - // print_r($otherIcomeRow); $other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks']; - if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){ - $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']); - } + + + if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){ + $is_other_income_available = 1; + $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']); + + } } ?>

Other Sources of Income of Individual Loan Applicants:

- 0){ + @@ -3685,20 +3710,22 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $elRow) { $otherLoanRow = json_decode($elRow['processed_json'],true); - //print_r($otherLoanRow); $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; - $total_no_of_data = 0; - if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){ - $total_no_of_data = count($otherLoanRow['loan_details']); - $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']); - } + $total_no_of_data = 0; + if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){ + $is_existing_loans_available = 1; + $total_no_of_data = count($otherLoanRow['loan_details']); + $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']); + } + } ?>

Existing loan obligation

- 0){ + @@ -3800,7 +3827,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } else{?> -

Neighbour Check was not possible due to Could not verify

+ +

Status of the check: could not verify.