form disabled key added : ps
This commit is contained in:
parent
fbbf855fe1
commit
e27e0ae180
@ -339,4 +339,5 @@ $route['saveAndUpdateTemplateFormsV2'] = 'Template_Management_Controller/saveTem
|
||||
$route['deleteTemplateV2'] = 'Template_Management_Controller/deleteTemplateV2';
|
||||
// $route['updateTemplateFormsV2'] = 'Template_Management_Controller/updateTemplateFormsV2';
|
||||
$route['loadFullTemplateV2'] = 'Template_Management_Controller/loadFullTemplateV2';
|
||||
$route['formWiseJSONTemplateV2'] = 'Template_Management_Controller/formWiseJSONTemplateV2';
|
||||
$route['formWiseJSONTemplateV2'] = 'Template_Management_Controller/formWiseJSONTemplateV2';
|
||||
$route['disableformV2'] = 'Template_Management_Controller/disableformV2';
|
||||
@ -1205,4 +1205,45 @@ class Template_Management_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function disableformV2_get(){
|
||||
if( (!isset($_GET['map_id'])) && (!isset($_GET['form_id'])) )
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'Key Missing! Please Check again map-id and form-id';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
} else{
|
||||
$map_id = $_GET['map_id'];
|
||||
$form_id = $_GET['form_id'];
|
||||
$fields = array('id');
|
||||
$where_condition_array = array('map_id'=>$map_id,"form_id"=>$form_id,"isactive"=>1);
|
||||
$json_table = $this->Template_Management_Model->selectCustomRecords($fields,$where_condition_array,TEMPLATE_JSON_V2);
|
||||
if(count($json_table)>0){
|
||||
// $data['dataStatus'] = true;
|
||||
// $data['status'] = REST_Controller::HTTP_OK;
|
||||
// $data['json'] = $json_table[0]['json'];
|
||||
// $this->response($data,REST_Controller::HTTP_OK);
|
||||
$res = $this->Template_Management_Model->updateRecords(array('is_form_disabled' => 1),TEMPLATE_JSON_V2,$where_condition_array);
|
||||
if($res){
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = 'Successfully Disabled';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}else{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
||||
$data['msg'] = 'Something Went Wrong! Try again Later';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'No Data Found Given Map-id and Form-id';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,7 +61,7 @@ class PDALERTS
|
||||
|
||||
//SMC MWISE Custome PdNotification Don't Call.
|
||||
$smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //SMC lender id MWISE in live and demo
|
||||
if($smc_lender_id != $core_details[0]['fk_lender_id']){
|
||||
if($smc_lender_id != $core_details[0]['fk_lender_id']){
|
||||
//Trigger Custom Notification apart from entity and PD level notification config
|
||||
CUSTOM_PDALERTS::custom_pdnotification($CI,$core_details);//die();
|
||||
//END Trigger Custom Notification apart from entity and PD level notification config
|
||||
@ -710,7 +710,9 @@ class PDALERTS
|
||||
$CI->db->SELECT("PDTRIGGER.pd_id,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,ENTITY.short_name,
|
||||
PDTRIGGER.scheduled_on,PDTRIGGER.pd_date_of_initiation,PDTRIGGER.updatedon,PDTRIGGER.encrypted_url,
|
||||
PDTRIGGER.lender_applicant_id,PDTRIGGER.fk_pd_type,PDTRIGGER.pd_status,PDTRIGGER.vendor_status,
|
||||
PDTRIGGER.fk_pd_allocated_to,ALLOCATED.email as allocated_email,PDAPPLICANTSDETAILS.applicant_name,
|
||||
PDTRIGGER.pd_contact_mobileno,PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDAPPLICANTSDETAILS.company_name,
|
||||
PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,
|
||||
PDTRIGGER.fk_pd_allocated_to,ALLOCATED.email as allocated_email,PDAPPLICANTSDETAILS.applicant_name,PDAPPLICANTSDETAILS.mobile_no,
|
||||
concat(ALLOCATED.first_name,' ',ALLOCATED.last_name) as pdofficer_name,
|
||||
PDTRIGGER.pd_agency_id,AGENCYLIST.agency_name,AGENCYLIST.mail_id as agency_mail");
|
||||
$CI->db->FROM(PDTRIGGER." as PDTRIGGER");
|
||||
@ -718,6 +720,10 @@ class PDALERTS
|
||||
$CI->db->JOIN(AGENCYLIST. ' as AGENCYLIST','PDTRIGGER.pd_agency_id = AGENCYLIST.agency_id','LEFT');
|
||||
$CI->db->JOIN(USERPROFILE." as ALLOCATED","PDTRIGGER.fk_pd_allocated_to = ALLOCATED.userid",'LEFT');
|
||||
$CI->db->JOIN(PDAPPLICANTSDETAILS." as PDAPPLICANTSDETAILS","PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1",'LEFT');
|
||||
$CI->db->JOIN(STATE.' as STATE','PDTRIGGER.fk_state = STATE.state_id ','LEFT');
|
||||
$CI->db->JOIN(CITY.' as CITY','PDTRIGGER.fk_city = CITY.city_id','LEFT');
|
||||
$CI->db->JOIN(PINCODE.' as PINCODE','PDTRIGGER.pincode = PINCODE.pincode_id','LEFT');
|
||||
|
||||
$CI->db->WHERE("PDTRIGGER.pd_id",$pd_id);
|
||||
$core_details = $CI->db->GET()->result_array();
|
||||
// echo count($core_details);
|
||||
@ -730,19 +736,19 @@ class PDALERTS
|
||||
// Mail - RCM
|
||||
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2 RCM '.$pd_id);
|
||||
$mail_id = $core_details[0]['allocated_email'];
|
||||
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['applicant_name'].") have been triggered to the vendor. <br><br><br> This is an automatically generated notification mail. Please contact on vendor email id for any
|
||||
queries/update. ";
|
||||
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['applicant_name'].") have been triggered to the vendor. ";
|
||||
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno'] ." & ".$core_details[0]['applicant_name'];
|
||||
// $mail->addBCC("ps9064515@gmail.com");
|
||||
// $mail_id = 'ps9064515@gmail.com';
|
||||
$ref_str = "vendor email id";
|
||||
}else if($flag == 1){
|
||||
// mail - Agency
|
||||
// $mail_id = "venbalap08@gmail.com";
|
||||
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1 AGENCY '.$pd_id);
|
||||
$mail_id = $core_details[0]['agency_mail'];
|
||||
$msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']." have been allocated to you. <br><br><br> This is an automatically generated notification mail. Please contact on client email id for any
|
||||
queries/update. ";
|
||||
$msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']." have been allocated to you. ";
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name'];
|
||||
$ref_str = "client email id";
|
||||
// $mail->addBCC("venbalap08@gmail.com");
|
||||
}else if($flag == 3){
|
||||
log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3 TRIGGER '.$pd_id);
|
||||
@ -755,8 +761,19 @@ class PDALERTS
|
||||
$msg = $pd_notification_msg[0]['lender'];
|
||||
$msg = self::stringReplace($msg,$core_details,'MAIL');
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name'];
|
||||
$ref_str = "";
|
||||
// $mail->addBCC("sanjeev.p@venbainfotech.com");
|
||||
}
|
||||
$company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
|
||||
$msg .= "<br><br> 1. Name of the firm : ".$company_name
|
||||
."<br> 2. Address : ".$core_details[0]['addressline1'].",".$core_details[0]['city_name'].",".$core_details[0]['state_name']."-".$core_details[0]['pincode']."."
|
||||
."<br> 3. Loan Amount : ".$core_details[0]['loan_amount']
|
||||
."<br> 4. Name of the loan applicant : ".$core_details[0]['applicant_name']
|
||||
."<br> 5. Contact Number : ".$core_details[0]['mobile_no'];
|
||||
if(!empty($ref_str)){
|
||||
$msg .= "<br><br><br> This is an automatically generated notification mail. Please contact on ".$ref_str." for any
|
||||
queries/update. ";
|
||||
}
|
||||
|
||||
$mail->IsSMTP(); // Telling the class to use SMTP
|
||||
$mail->SMTPAuth = true;
|
||||
|
||||
@ -2351,7 +2351,7 @@ class PD_Model extends SPARQ_Model {
|
||||
$map_id = "";
|
||||
}
|
||||
}
|
||||
$this->db->SELECT('TEMPLATE_JSON_V2.map_id,TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_order,PDFORMS.pd_form_level_order,PDFORMS.pd_form_name as form_name');
|
||||
$this->db->SELECT('TEMPLATE_JSON_V2.map_id,TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_order,PDFORMS.pd_form_level_order,PDFORMS.pd_form_name as form_name,TEMPLATE_JSON_V2.is_form_disabled');
|
||||
$this->db->FROM(TEMPLATE_JSON_V2.' as TEMPLATE_JSON_V2');
|
||||
$this->db->JOIN(PDFORMS.' as PDFORMS','TEMPLATE_JSON_V2.form_id = PDFORMS.pd_form_id','LEFT');
|
||||
$this->db->WHERE('TEMPLATE_JSON_V2.isactive',1);
|
||||
@ -2593,4 +2593,11 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
return $result_data;
|
||||
}
|
||||
|
||||
public function testSection($id){
|
||||
$this->db->SELECT('*')->FROM("t_pd_form_details_json")->WHERE('fk_pd_id',$id)->WHERE('isactive',1)
|
||||
->WHERE('fk_form_id',22)->WHERE('company_id',1);
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ class Template_Management_Model extends SPARQ_Model {
|
||||
}
|
||||
|
||||
public function getTemplateFormsV2($value){
|
||||
$this->db->SELECT('TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_name as form_name,TEMPLATE_JSON_V2.json');
|
||||
$this->db->SELECT('TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_name as form_name,TEMPLATE_JSON_V2.json,TEMPLATE_JSON_V2.is_form_disabled');
|
||||
$this->db->FROM(TEMPLATE_JSON_V2.' as TEMPLATE_JSON_V2');
|
||||
$this->db->JOIN(PDFORMS.' as PDFORMS','TEMPLATE_JSON_V2.form_id = PDFORMS.pd_form_id','LEFT');
|
||||
$this->db->WHERE('TEMPLATE_JSON_V2.isactive',1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user