diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index ec5bca2f..a6f05be1 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2264,7 +2264,7 @@ class PD_Controller extends REST_Controller { $where_condition_array['rental_count_id'] = $rental_count_id; } - $id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array); + //$id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array); /*****Call Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA******/ @@ -5034,8 +5034,41 @@ class PD_Controller extends REST_Controller { return null; } - } - + } + + function demo($var) { + echo " Before try block"; + try { + + $try = 'THis is declared in side try block'; + echo "\n Inside try block"; + + // If var is zero then only if will be executed + if($var == 0) + { + + // If var is zero then only exception is thrown + throw new Exception('Number is zero.'); + + // This line will never be executed + echo "\n After throw (It will never be executed)"; + } + } + + // Catch block will be executed only + // When Exception has been thrown by try block + catch(Exception $e) { + echo "\n Exception Caught", $e->getMessage(); + echo "\n Exception Caught", $e->getLine(); + echo "\n Exception Caught", $e->getFile(); + echo $try; + } + + // This line will be executed whether + // Exception has been thrown or not + echo "\n After catch (will be always executed)"; + } + public function codeigniterViewTest_post() { @@ -5044,6 +5077,11 @@ class PD_Controller extends REST_Controller { // $this->load->helper('push_notification'); // PUSH_NOTIFICATION::notifyMob('fzVpWPyynTI:APA91bH16QpgugWec5VAMRPXu8kDFytkMRxXGRJGm1XJwd5H6oWmp8OCTfx7F8qj97zC0i7oyg73uRFkZS6rOxeJbkTk6KJN5mYZT5gRJIDJ_CQ6n6nuQZ5LwFs9_x9cr5sraA5ADyMu','EST','test mesg from server',1);die(); + + //$this->demo(5); + // $this->demo(0); + // die(); + $is_regenerate = 0; if(isset($records['regenerate'])) { @@ -7726,6 +7764,7 @@ class PD_Controller extends REST_Controller { //print_r($score);die(); $score_questions_display = $this->PD_Model->getScoreableQuestionToDispaly($pdid); $t = $this->load->view('report_templates/scorecard',array('pd_score' => $score,'score_questions_display' => $score_questions_display),true); + echo $t;die(); $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf index 2f4ede7d..6f0503d8 100644 Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php index f2d9430c..445f8ad5 100644 --- a/api/application/helpers/getprocessedjson_helper.php +++ b/api/application/helpers/getprocessedjson_helper.php @@ -175,6 +175,53 @@ class GETPROCESSEDJSON // print_r($loan); } } + + if(array_key_exists('state',$raw_json)) + { + //print_r($address); + $CI->db->SELECT( $master_tables_field_names['STATE'] ); + $CI->db->FROM(STATE); + $CI->db->WHERE('isactive',1); + $CI->db->WHERE($master_tables_pkid['STATE'] ,$raw_json['state']); + $adress_type_name= $CI->db->GET()->result_array(); + //print_r($CI->db->last_query()); + if(count($adress_type_name)) + { + $raw_json['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']]; + } + } + + if(array_key_exists('city',$raw_json)) + { + //print_r($address); + $CI->db->SELECT( $master_tables_field_names['CITY'] ); + $CI->db->FROM(CITY); + $CI->db->WHERE('isactive',1); + $CI->db->WHERE($master_tables_pkid['CITY'] ,$raw_json['city']); + $city= $CI->db->GET()->result_array(); + //print_r($CI->db->last_query()); + if(count($city)) + { + $raw_json['city_master'] = $city[0][$master_tables_field_names['CITY']]; + } + } + + if(array_key_exists('pincode',$raw_json)) + { + //print_r($address); + $CI->db->SELECT( $master_tables_field_names['PINCODE'] ); + $CI->db->FROM(PINCODE); + $CI->db->WHERE('isactive',1); + $CI->db->WHERE($master_tables_pkid['PINCODE'] ,$raw_json['pincode']); + $pincode= $CI->db->GET()->result_array(); + //print_r($CI->db->last_query()); + if(count($pincode)) + { + $raw_json['pincode_master'] = $pincode[0][$master_tables_field_names['PINCODE']]; + } + } + + } return $raw_json; diff --git a/api/application/helpers/inlinephototransform_helper.php b/api/application/helpers/inlinephototransform_helper.php index e32cd69e..585232b3 100644 --- a/api/application/helpers/inlinephototransform_helper.php +++ b/api/application/helpers/inlinephototransform_helper.php @@ -22,10 +22,9 @@ class INLINEPHOTOTRANSFORM $base64 = self::addTimestampAndReturnBase64($CI,$value['is_person_met_id_proof'],($value['applicant_name'].'-id_proof'),$pd_details,18); $records['individuals'][$key]['is_person_met_id_proof'] = $base64; } - - return $records; - } + + return $records; } } diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index f8a2e814..2e639890 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -1067,7 +1067,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');

LOAN DETAILS:

During the PD visit, '.$main_applicant_name.', provided the following information about loan applied for:'; @@ -1146,6 +1146,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).' ('.MYUTIL::numtowords($loan_form['emv_per_customer']).')'); } + + if(isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') + { + $loan_table_dispaly_rows[] = array('particulars' => 'Current Owner/Seller of the property','details' => $loan_form['property_seller'] ); + + $address_of_owner_seller_property = $loan_form['address'] . (isset($loan_form['city_master']) ? ', '.$loan_form['city_master'] : '') . (isset($loan_form['state_master']) ? ', '.$loan_form['state_master'] : '') . (isset($loan_form['pincode_master']) ? ', '.$loan_form['pincode_master'] : ''); + + $loan_table_dispaly_rows[] = array('particulars' => 'Address of the property','details' => $address_of_owner_seller_property ); + } //print_r($loan_table_dispaly_rows); ?>

diff --git a/api/application/views/report_templates/scorecard.php b/api/application/views/report_templates/scorecard.php index dd3c221d..8febf00c 100644 --- a/api/application/views/report_templates/scorecard.php +++ b/api/application/views/report_templates/scorecard.php @@ -1,441 +1,7 @@ - - - - - - - - - - - - +?> @@ -445,10 +11,9 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if($show_detailed_scorecard) { - echo '
'; - echo "

Detailed Score Card Section

" ; + echo "

Detailed Score Card

" ; // *** General Section Questions Score Table - echo ''; + echo '
'; echo ""; foreach($pd_score['general'] as $key => $general) { @@ -467,7 +32,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // *** Asset Caculation Score Table - echo '
General Questions L1(". $pd_score['general']['otp_done']['l1_weightage']."%) L2 Answer Score Attributed Score Max Score
'; + echo '
'; echo ""; echo ""; @@ -490,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo '


'; // *** Final Remarks Questions Score Table - echo '
Asset Value Calculaitons
Actual Value Of Assets (a)". number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'],2,'.',',')."
'; + echo '
'; echo ""; foreach($pd_score['final_remarks'] as $key => $final_remark) { @@ -508,7 +73,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo '


'; //print_r($pd_score['business']); - echo '
Final Remarks Questions L1(". $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage']."%) L2Answer ScoreAttributed Score Max Score
'; + echo '
'; // *** Business Section Questions Score Table echo ""; @@ -548,7 +113,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo '

'; - echo "
Business Questions L1(". $pd_score['business']['no_of_years_business_run']['l1_weightage']."%) L2Answer Score Attributed ScoreMax Score
"; + echo "
"; echo ""; $index = 0; // print_r($certificates); @@ -570,7 +135,5 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // ########################### End Of Score Card Section ######################################### ?> - - - + \ No newline at end of file
Business Certificates Answer Score Attributed Score Max Score