diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 7e2bd170..58f02843 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'),'approach_to_pd_location' => array('Approach to PD location','5'),'name_board_seen' => array('Name Board Seen','13'), 'stock_image' => array('Stock image','11'),'attendance_seen_pic' => array('Attendance Img','13'),'attendance_seen_pic' => array('Attendance Img','13'),'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'),'person_met_id' => array('Person met ID Proof','18'),'name_board_seen' => array('Name Board Seen','13'), 'stock_image' => array('Stock image','11'),'attendance_seen_pic' => array('Attendance Img','13'),'attendance_seen_pic' => array('Attendance Img','13'),'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 $existing_imges = array();
function __construct()
@@ -4706,7 +4706,7 @@ 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'])));
+ $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']));
//}
//$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id']));
@@ -4773,7 +4773,7 @@ public function getPDFormDetailsJSON_post()
{
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,null,null,'report');
}
- $temp = 'DEFAULT DATA';
+ $t = 'DEFAULT DATA';
// if(!count($add_on_pd))
// {
@@ -4800,6 +4800,7 @@ public function getPDFormDetailsJSON_post()
}
else if($data['pd_master_details'][0]['fk_pd_type'] == 3) //Tele PD
{
+
$t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_TELE_PD',$data,true);
}
// }
@@ -4811,7 +4812,7 @@ public function getPDFormDetailsJSON_post()
$pd_report_time = date('Y-m-d-H-i-s');
$pd_report_store = $this->external_path.'/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
- $is_write_done = file_put_contents($pd_report_store,$temp);
+ $is_write_done = file_put_contents($pd_report_store,$t);
if($is_write_done)
{
@@ -6015,7 +6016,7 @@ 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'])));
+ $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']));
//}
//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'] : '');
@@ -9482,6 +9483,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
$records = $this->post('records');
+
$id = $this->PD_Model->updateRecords(array('start_location' => $records['geo_location'],'fk_updatedby' => $records['fk_updatedby']),PDTRIGGER,array('pd_id' => $records['pd_id']));
if($id)
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index c5197ba1..207362f9 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -1023,8 +1023,8 @@ class PD_Model extends SPARQ_Model {
//Get PD Master Details including Template id @param $pd_id
$pd_master_detials = $this->getPDMasterDetails($pdid,$random_string);
$pd_additional_requirements = $this->getPDAdditionalRequirements($pdid);
- $docs_to_be_collected = $this->getPDAdditionalRequirements($pdid);
-
+ $docs_to_be_collected = $this->getDocsToBeCollected($pdid);
+ //echo count($docs_to_be_collected);die();
$pd_applicants_detials = $this->getApplicantsDetails($pdid);
//print_r($pd_master_detials);die();
@@ -1040,6 +1040,10 @@ class PD_Model extends SPARQ_Model {
{
$this->db->WHERE('TEMPLATEFORMS.form_id != ',24); //credit managers specific queries form
}
+ if($pd_master_detials[0]['fk_pd_type'] == 3)
+ {
+ $this->db->WHERE('TEMPLATEFORMS.form_id != ',19);
+ }
$this->db->ORDER_BY('PDFORMS.pd_form_order');
$template_forms = $this->db->GET()->result_array();
//print_r($this->db->last_query());die();
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
index a6e94ce1..d2a82741 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
@@ -1069,7 +1069,7 @@ if ( isset($pdf) ) {
echo 'Business Address : '.$pd_address['address'].', '.$pd_address['city_master'].', '.$pd_address['state_master'].' - '.$pincode.'.';
}
- echo '
GPS Coordinates of Business Address : '.$pd_master_details[0]['start_location'];
+ echo '
GPS Coordinates of Business Address : ';echo isset($pd_master_details[0]['start_location']) ? $pd_master_details[0]['start_location'] : 'Not Available' ;
echo '
';
?>