diff --git a/api/application/config/routes.php b/api/application/config/routes.php
index 34d8666b..b856f733 100644
--- a/api/application/config/routes.php
+++ b/api/application/config/routes.php
@@ -227,6 +227,7 @@ $route['smartyTestFunction'] = 'PD_Controller/smartyTestFunction';
$route['codeigniterViewTest'] = 'PD_Controller/codeigniterViewTest';
$route['archivePDImages'] = 'PD_Controller/archivePDImages';
$route['pdFormsCompletenessCheck'] = 'PD_Controller/pdFormsCompletenessCheck';
+$route['checkExistPDDetails'] = 'PD_Controller/checkExistPDDetails';
//PD Form Related
$route['getPDFormDetails'] = 'PD_Controller/getPDFormDetailsJSON';
diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 330ffcbb..d35a8045 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -9107,4 +9107,23 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//pd_co_applicant_id, fk_pd_id, , applicant_type, mobile_no, landline, email, isactive, addressline1, addressline2, addressline3, fk_city, fk_state, pincode, relation, company_name, applicant_title_name, additional_pd_id
}
+
+ public function checkExistPDDetails_post()
+ {
+ $records = $this->post('records');
+ //print_r($records);die();
+ $lender_applicant_id = isset($records['lender_applicant_id']) ? $records['lender_applicant_id'] : null;
+ $params = array();
+ if($lender_applicant_id)
+ {
+ $params['lender_applicant_id'] = $lender_applicant_id;
+ }
+
+ $result_data = $this->PD_Model->checkExistPDDetails($params);
+ $data['dataStatus'] = true;
+ $data['status'] = REST_Controller::HTTP_OK;
+ $data['records'] = $result_data;
+ $this->response($data,REST_Controller::HTTP_OK);
+
+ }
}
\ No newline at end of file
diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php
index 8527fa40..6af8ae8f 100644
--- a/api/application/helpers/pdalerts_helper.php
+++ b/api/application/helpers/pdalerts_helper.php
@@ -164,7 +164,7 @@ class PDALERTS
}
$msg = $pd_notification_msg[0]['lender'];
- $msg = self::stringReplace($msg,$core_details);
+ $msg = self::stringReplace($msg,$core_details,'MAIL');
if($lender_email != null)
{
// self::sendMail($CI,$lender_email,$msg,$core_details); // currently Mail disabled
@@ -405,7 +405,7 @@ class PDALERTS
/*********************************************/
/**REPLACE PLACEHOLDERS****/
/*********************************************/
- public static function stringReplace($msg,$core_details)
+ public static function stringReplace($msg,$core_details,$for = 'SMS')
{
$msg = str_replace('{{applicant_name}}',$core_details[0]['applicant_name'],$msg);
@@ -418,9 +418,17 @@ class PDALERTS
$msg = str_replace('{{lender_name}}',$core_details[0]['short_name'],$msg);
$msg = str_replace('{{link}}',$core_details[0]['encrypted_url'],$msg);
//$msg = str_replace('{{\n\n}}','\n\n',$msg);
- $msg = nl2br($msg);
- $msg = str_replace('\n','',$msg);
- $msg = str_replace('\\','',$msg);
+ // $msg = nl2br($msg);
+ if($for == 'SMS')
+ {
+ $msg = str_replace('\n','',$msg);
+ $msg = str_replace('\\','',$msg);
+ }
+ else if($for == 'MAIL')
+ {
+ $msg = str_replace('\n','
',$msg);
+ $msg = str_replace('\\','',$msg);
+ }
return $msg;
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index 385ad409..e79ea622 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -604,7 +604,12 @@ class PD_Model extends SPARQ_Model {
case 'fk_pd_template_id':
$log_string = $arrayForText[$log['field_name']].' Changed From "'.$log['old_template_name'].'" to "'.$log['new_template_name'].'"';
- $actual_logs[] = $log_string;
+ //$actual_logs[] = $log_string;
+ $user = $log['createdby'];
+ $time = $log['createdon'];
+ $actual_logs[$log_key]['log'] = $log_string;
+ $actual_logs[$log_key]['user'] = $user;
+ $actual_logs[$log_key]['time'] = $time;
break;
case 'fk_customer_segment':
@@ -796,7 +801,7 @@ class PD_Model extends SPARQ_Model {
$result_data['child'] = array('testkey'=>'testvalue');
$result_data['master'] = $actual_logs;
- //print_r($result_data['master']);die();
+ print_r($result_data['master']);die();
// Child History Start
// $this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.isactive, PDAPPLICANTSDETAILS.relation');
// $this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
@@ -1841,5 +1846,19 @@ class PD_Model extends SPARQ_Model {
return $result;
}
+
+ function checkExistPDDetails($params)
+ {
+ if(count($params))
+ {
+ $fields = array('pd_id','pd_sno');
+ $where_condition_array = array('lender_applicant_id' => $params['lender_applicant_id']);
+ return $this->selectCustomRecords($fields,$where_condition_array,PDTRIGGER);
+ }
+ else
+ {
+ return array();
+ }
+ }
}
\ No newline at end of file
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
index bf5ca2ea..4e8c8ad6 100644
--- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php
+++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
@@ -3628,7 +3628,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
}
?>
-