diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 1c903adc..d5f006cd 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -20,7 +20,7 @@ class PD_Controller extends REST_Controller { //class level variable declaration //protected $external_path; - private $photo_names = array('selfie_with_person_met' => array('Person met','18'),'person_met_id' => array('Person met ID Proof','18'),'name_board_seen' => array('Name Board Seen','13'), 'stock_image' => array('Stock image','11'),'client_image' => array('Client Bills','2'),'supplier_image' => array('Supplier Bills','1'),'machinary_image' => array('Machinery Image','22'),'gst_Regn_cert_pic' => array('GST Regn Cert','13'),'pf_regn_pic' => array('PF Regn','13'),'esic_regn_pic' => array('ESIC Regn','13'),'export_import_cert_pic' => array('Export Import Cert','13'),'factory_cert_pic' => array('Factory Cert','13'),'shop_eat_act_cert_pic' => array('Shop Est Act Cert','13'),'eb_bill_pic' => array('EB Bill','13'),'practice_cert_pic' => array('Cert of Practice','13'),'fire_noc_pic' => array('Fire NOC','13')); + private $photo_names = array('selfie_with_person_met' => array('Person met','18',0),'person_met_id' => array('Person met ID Proof','18',0),'name_board_seen' => array('Name Board Seen','13',0),'machinary_image' => array('Machinery Image','22',0),'gst_Regn_cert_pic' => array('GST Regn Cert','13',0),'pf_regn_pic' => array('PF Regn','13',0),'esic_regn_pic' => array('ESIC Regn','13',0),'export_import_cert_pic' => array('Export Import Cert','13',0),'factory_cert_pic' => array('Factory Cert','13',0),'shop_eat_act_cert_pic' => array('Shop Est Act Cert','13',0),'eb_bill_pic' => array('EB Bill','13',0),'practice_cert_pic' => array('Cert of Practice','13',0),'fire_noc_pic' => array('Fire NOC','13',0),'stock_image' => array('Stock image','11',1),'client_image' => array('Client Bills','2',1),'supplier_image' => array('Supplier Bills','1',1)); private $existing_imges = array(); function __construct() @@ -606,7 +606,7 @@ class PD_Controller extends REST_Controller { if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) { - $record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname); + $record_data = array('fk_pd_id' => $pd_id,'img_type' => 3,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname); $this->PD_Model->saveRecords($record_data,PDDOCUMENTS); } @@ -942,7 +942,10 @@ class PD_Controller extends REST_Controller { $pd_details['complete_location'] = isset($pd_details['link']) ? $pd_details['link'] : null; unset($pd_details['link']); } - + if($pd_details['pd_status'] == COMPLETED) + { + $pd_details['is_cus_link_disabled'] = 1; + } if(!isset($pd_details['is_revert_status'])) { $pd_details['pd_visit_date'] = date('Y-m-d H:i:s'); @@ -990,6 +993,13 @@ class PD_Controller extends REST_Controller { $pd_details['fk_pd_template_id'] = $this->assignPDTempalate($pd_details['pd_id']); //echo $pd_details['fk_pd_template_id']; } + + /*********************** vendor status if it is allocated to partner*********************/ + if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == ALLOCATED_TO_PARTNER )) + { + + $pd_details['vendor_status'] = TRIGGERED; + } //die(); $primary_address_id = null; @@ -1537,10 +1547,16 @@ public function assignPDTempalate($data) public function allocatePD_post() { $records = $this->post('records'); - //print_r($records); + //print_r($records);die(); //if($records['fk_pd_allocated_to'] != "" || $records['fk_pd_allocated_to'] != null) //{ - $records['pd_status'] = ALLOCATED; + $records['pd_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED; + + if(isset($records['pd_status']) && ($records['pd_status'] == ALLOCATED_TO_PARTNER )) + { + + $records['vendor_status'] = TRIGGERED; + } //} $where_condition_array = array('pd_id' => $records['pd_id']); $pd_id_modified = $this->PD_Model->updateRecords($records,PDTRIGGER,$where_condition_array); @@ -4794,7 +4810,8 @@ public function getPDFormDetailsJSON_post() // } // else // { - $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']),'fk_pd_type' => $data['pd_master_details'][0]['fk_pd_type'])); + $pd_type = data['pd_master_details'][0]['fk_pd_type'] == 3 ? 3 : 1; + $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']),'fk_pd_type' => $pd_type)); //} //$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); @@ -4866,7 +4883,7 @@ public function getPDFormDetailsJSON_post() // { - if($data['pd_master_details'][0]['fk_pd_type'] == 1) //Full PD + if($data['pd_master_details'][0]['fk_pd_type'] == 1 || $data['pd_master_details'][0]['fk_pd_type'] == 2) //Full PD { if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL')) @@ -5735,6 +5752,7 @@ public function getPDFormDetailsJSON_post() } + // Not in use**************moved to helper file function getSatelliteImage($pd_id) { $pdid = $pd_id; @@ -5971,7 +5989,7 @@ public function getPDFormDetailsJSON_post() { //print_r($this->aws_s3->getAllObjectsInaBucket('test-lender1','pd114'));die(); - print_r($this->aws_s3->copyS3Object('test-lender1','test-lender1','pd114','pd114-copy'));die(); + //print_r($this->aws_s3->copyS3Object('test-lender1','test-lender1','pd114','pd114-copy'));die(); //satellite_image::getSatelliteImage(1704);die(); //echo $this->assignPDTempalate(1325);die(); //$this->getSatelliteImage(342);die();//velmurugan.s@venbainfotech.com @@ -6105,7 +6123,8 @@ public function getPDFormDetailsJSON_post() // else // { //echo 'NOR'; - $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']),'fk_pd_type' => $data['pd_master_details'][0]['fk_pd_type'])); + $pd_type = $data['pd_master_details'][0]['fk_pd_type'] == 3 ? 3 : 1; + $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']),'fk_pd_type' => $pd_type)); //} //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'] : ''); @@ -6223,7 +6242,7 @@ public function getPDFormDetailsJSON_post() { - if($data['pd_master_details'][0]['fk_pd_type'] == 1) //Full PD + if($data['pd_master_details'][0]['fk_pd_type'] == 1 || $data['pd_master_details'][0]['fk_pd_type'] == 2) { if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL')) @@ -7302,7 +7321,12 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $temp_base64_string = $doc['image']; $title = $doc['Name']; $is_show_report = isset($doc['is_show_report']) ? $doc['is_show_report'] : null; + if($pd_details[0]['fk_pd_type'] == 2 && strpos($title, 'Approach to PD Location') !== false) + { + $is_show_report = 1; + } //$external_path = $this->config->item('external_data_path'); + //echo $title.'-'.$is_show_report;die(); $co_applicant_id = isset($doc['co_applicant_id']) ? $doc['co_applicant_id'] : null; $img_type = isset($doc['img_type']) ? $doc['img_type'] : null; $output_file = $this->external_path."/pd_reports/". $pd_id ."/temp_base64_image.jpeg"; @@ -7373,7 +7397,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $record_data['company_id'] = $company_id ? $company_id : null; $id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS); if($id != null || $id != "") { $count++; $pks[] = $id;} - $uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,$time = '+30 days'); + $uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,$time = '+1 week'); //print_r($uri); } @@ -7576,11 +7600,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() switch($pd_master_details[0]['fk_pd_type']) { case 1://FULL PD + case 2: $score_questions = PDSCORE::genericDIPDScoreCalculate($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details); break; - case 2://smart PD - break; + case 3://tele PD $score_questions = PDSCORE::genericTelePDScoreCalculate($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details); @@ -9031,13 +9055,13 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() // echo $company_id;die(); //de activate previous one - if($records['image_key'] != 'common_image' && $records['image_key'] != 'stock_image') + if(!$records['is_multiple']) { $this->PD_Model->updateRecords(array('isactive' => 0),PDDOCUMENTS,array('fk_pd_id' => $records['fk_pd_id'],'fk_form_id' => $records['fk_form_id'],'pd_document_title' => $current_doc_title)); // print_r($this->db->last_query()); } - $res = $this->saveBase64Images($records['fk_pd_id'],$records['fk_form_id'],$company_id,$rental_count_id = null,array($img_array)); + $res = $this->saveBase64Images($records['fk_pd_id'],($records['fk_form_id'] ? $records['fk_form_id'] : null),$company_id,$rental_count_id = null,array($img_array)); if($res) { $data['dataStatus'] = true; @@ -9133,9 +9157,9 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() public function getPDImgData($pd_id,$random_string,$is_cus_link_disabled) { - $this->existing_imges = $this->PD_Model->getSignedPDDocsURL($pd_id,null,null,null,null,'report'); + $this->existing_imges = $this->PD_Model->getSignedPDDocsURL($pd_id,null,null,null,null,'customer_app'); $docs_to_be_collected = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' =>$pd_id),PDDOCSTOBECOLLECTED); - //print_r($docs_to_be_collected);//die(); + //print_r($this->existing_imges);die(); $pd_master_details = $this->PD_Model->getPDMasterDetails($pd_id); if($pd_master_details[0]['customer_segment_abbr'] == 'SAL') @@ -9151,7 +9175,44 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() foreach ($this->photo_names as $key => $value) { $temp = $this->photoMapping($key,$value); - $final_data[] = is_array($temp) ? $temp : array('img_key' =>$key,'img_name' => $value[0],'img_url' => '','fk_form_id' => $value[1]); + if(is_array($temp) && count($temp)) + { + //echo count($temp); + // if($temp['is_multiple']) + // { + + // if(!array_key_exists($temp['img_key'], $final_data)) + // { + // $temp['img_data'][] = array('img_url' => $temp['img_url']); + // unset($temp['img_url']); + // $final_data[$temp['img_key']] = $temp; + // } + // else + // { + // $final_data[$temp['img_key']]['img_data'] = array('img_url' => $temp['img_url']); + // } + + // } + // else + // { + // $final_data[] = $temp; + // } + // if($temp['is_multiple']) + // { + // $temp = array_values($temp); + // } + $final_data[] = $temp; + + } + else + { + $temp_array = array('img_key' =>$key,'img_name' => $value[0],'fk_form_id' => $value[1],"is_multiple" => $value[2]); + $temp_array[($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : ''); + $final_data[] = $temp_array; + + } + + } foreach ($this->existing_imges as $key => $value) @@ -9160,6 +9221,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() if(!$value['fk_form_id'] && ($value['pd_document_title'] != 'satellite')) { $final_data[] = array('img_key' =>'common_image','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => null); + unset($this->existing_imges[$key]); } elseif($value['pd_document_title'] != 'satellite' && $value['fk_form_id'] == 24) { @@ -9175,6 +9237,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() { $is_listed = true; unset($docs_to_be_collected[$dc_key]); + unset($this->existing_imges[$key]); //echo 'inside if check - '.$dc_value['doc_name'].'#'.$value['pd_document_title'].'****'; } } @@ -9184,21 +9247,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => 24,'is_multiple' => 0); //break; - } - // else - // { - // $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $dc_value['doc_name'],'img_url' => '','fk_form_id' => 24,'is_multiple' => 0); - - // } - - + } } } } - //print_r(($docs_to_be_collected)); + //print_r(($this->existing_imges));die(); //add remaining docs_to_be_collected into final array if(is_array($docs_to_be_collected) && count($docs_to_be_collected)) { @@ -9214,7 +9270,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() { foreach ($this->photo_names as $key => $value) { - $final_data[] = array('img_key' => $key,'img_name' => $value[0],'img_url' => "",'fk_form_id' => $value[1]); + $final_data[] = array('img_key' => $key,'img_name' => $value[0],'img_url' => "",'fk_form_id' => $value[1],"is_multiple" => $value[2]); } @@ -9222,7 +9278,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() { foreach ($docs_to_be_collected as $key => $value) { - $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['doc_name'],'img_url' => "",'fk_form_id' => "24"); + $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['doc_name'],'img_url' => "",'fk_form_id' => "24","is_multiple" => 1); } } } @@ -9240,6 +9296,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() ///echo $img_key;die(); //;die(); + $multiple_img_data = array(); + $current_multiple_img_key = null; foreach ($this->existing_imges as $key => $value) { //print_r($value);die(); @@ -9252,7 +9310,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() { //echo "SELFIE"; - $arr = array('img_key' => 'selfie_with_person_met','img_name' => $this->photo_names['selfie_with_person_met'][0],'fk_form_id' => $this->photo_names['selfie_with_person_met'][1],'img_url' => $value['doc_url'],'is_multiple' => 0); + $arr = array('img_key' => 'selfie_with_person_met','img_name' => $this->photo_names['selfie_with_person_met'][0],'fk_form_id' => $this->photo_names['selfie_with_person_met'][1],'img_url' => $value['doc_url'],'is_multiple' => 0); unset($this->existing_imges[$key]); return $arr; @@ -9292,9 +9350,28 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() //echo $current_img_key.'***'.$value['pd_document_title']; //unset($this->existing_imges[$key]); //echo "OTHER"; - $arr = array('img_key' => $value['pd_document_title'],'img_name' => $this->photo_names[ $value['pd_document_title'] ][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names[ $value['pd_document_title'] ][1],'is_multiple' => 0); + if($current_img[2]) + { + //echo $current_img_key.'***'.$value['pd_document_title']; + $current_multiple_img_key = $current_img_key; + if(!array_key_exists($current_img_key, $multiple_img_data)) + { + $multiple_img_data[$current_img_key] = array('img_key' => $value['pd_document_title'],'img_name' => $this->photo_names[ $value['pd_document_title'] ][0],'img_data' => array(array('img_url' => $value['doc_url'])),'fk_form_id' => $this->photo_names[ $value['pd_document_title'] ][1],'is_multiple' => $current_img[2]); + } + else + { + $multiple_img_data[$current_img_key]['img_data'][] = array('img_url' => $value['doc_url']); + } + + } + else + { + $arr = array('img_key' => $value['pd_document_title'],'img_name' => $this->photo_names[ $value['pd_document_title'] ][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names[ $value['pd_document_title'] ][1],'is_multiple' => $current_img[2]); + return $arr; + } unset($this->existing_imges[$key]); - return $arr; + + // unset($this->photo_names['selfie_with_person_met']); // return $arr; } @@ -9305,6 +9382,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() // return array('img_key' =>$current_img_key,'img_name' => $current_img_key,'img_url' => '','fk_form_id' => $current_img[1]); // } } + return $current_multiple_img_key ? $multiple_img_data[$current_multiple_img_key] : $multiple_img_data; + //return $multiple_img_data; } @@ -9753,8 +9832,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) { - log_message('ERROR','###PDIMAGE stored in S3'.$pd_id.' - '.'13'); - $record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'fk_form_id'=>13,'co_applicant_id' => $co_applicant_id,'img_type' => $img_type); + log_message('ERROR','###PDIMAGE stored in S3'.$pd_id.' - '.'18'); + $record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'fk_form_id'=>18,'co_applicant_id' => $co_applicant_id,'img_type' => $img_type); //de activate older one @@ -9763,7 +9842,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $record_data['pd_document_name'] = $temp_file_name; $id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS); - $uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,$time = '+30 days'); + $uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,$time = '+1 week'); if($id) { $data['dataStatus'] = true; @@ -9797,10 +9876,25 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $records = $this->post('records'); //print_r($records); + $fields_to_update = array('vendor_status' => $records['vendor_status'],'fk_updatedby' => $records['fk_updatedby']); + if(isset($records['fk_pd_allocated_to'])) + { + $fields_to_update['fk_pd_allocated_to'] = $records['fk_pd_allocated_to']; + } + if(isset($records['vendor_status']) && $records['vendor_status'] == STARTED) + { + $fields_to_update['start_location'] = $records['link']; - $id = $this->PD_Model->updateRecords(array('vendor_status' => $records['vendor_status'],'fk_updatedby' => $records['fk_updatedby']),PDTRIGGER,array('pd_id' => $records['pd_id'])); + } + + $id = $this->PD_Model->updateRecords($fields_to_update,PDTRIGGER,array('pd_id' => $records['pd_id'])); if($id) { + if(isset($records['vendor_status']) && $records['vendor_status'] == STARTED) + { + satellite_image::getSatelliteImage($records['fk_pd_id']); + } + $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; $data['records'] = $id; diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 32d90a20..c68e160e 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -548,7 +548,15 @@ class Sales_PD_Controller extends REST_Controller { $completed_sections = $this->Sales_PD_Model->selectCustomRecords(array('section_id'),array('status' => 1,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA); //print_r($completed_sections); - $img_satellite_check = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'satellite','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS); + if($records['sales_pd_type'] == 1) + { + $img_satellite_check = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'satellite','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS); + } + else if($records['sales_pd_type'] == 2) + { + log_message('ERROR','###TELE SALES PD satellite check overrided'); + $img_satellite_check[0]['count'] = array();//for sales tele pd avoid satellite img check + } $img_selfile_check = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'selfie_with_person_met','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS); @@ -619,9 +627,9 @@ class Sales_PD_Controller extends REST_Controller { $records['status'] = 'COMPLETED'; $records['is_cus_link_disabled'] = 1; $records['completed_date'] = date('Y-m-d h:i:s'); - + //echo 'final';die(); $id = $this->Sales_PD_Model->updateRecords($records,SALES_PD_DATA,array('sales_pd_id' => $records['sales_pd_id'])); - + $this->prepareSalesPDReport($records['sales_pd_id'],false); sleep(10); log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['sales_pd_id']); diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 904b8991..e538108e 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -333,7 +333,7 @@ class PD_Model extends SPARQ_Model { $where_condition_array['fk_form_id'] = null ; } $time = '+2 day'; - if($api_client == 'report') + if($api_client == 'report' || $api_client == 'customer_app') { $time = '+5 day'; @@ -352,6 +352,11 @@ class PD_Model extends SPARQ_Model { foreach($document_lists as $key => $value) { + if($api_client == 'customer_app' && $value['img_type'] == 3) + { //echo $value['pd_document_name']; + unset($document_lists[$key]); + continue; + } $profilepics3path = 'pd'.$pdid.'/'.$value['pd_document_name']; $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$profilepics3path,$time); $document_lists[$key]['doc_url'] = $singed_uri; diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index 43849568..c8847f4e 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -2288,7 +2288,7 @@ if($total_no_of_business > 0) { } - else{ echo "

Financial statements not provided by Loan Applicants to PD officer.

";} + else { if($pd_master_details[0]['fk_pd_type'] == 1) { echo "

Financial statements not provided by Loan Applicants to PD officer.

";} } ?> @@ -2432,11 +2432,14 @@ if($total_no_of_business > 0) { echo '

Validation of Customer Declared Financials :

'; echo 'Kuccha Record Seen (Yes/No) : ';echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.'; - if($financial_kuccha_info['kuccha_records_shown'] == 'yes') + if($financial_kuccha_info['kuccha_records_shown'] == 'yes' ) { - echo '

Photograph of Kuchha Bills Allowed (Yes/No) : '. ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No'); + echo "

Photograph of Kuchha Bills Allowed (Yes/No) : ". ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No'); - echo '

Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No'); + if($pd_master_details[0]['fk_pd_type'] == 1) + { + echo '

Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No'); + } } }