SAVE PD PHOTOS AND ADDITIONAL PD ISSUES FIXED
This commit is contained in:
parent
b58d57e8b4
commit
6ccae632a2
@ -59,5 +59,5 @@ $config['master_tables_field_names'] = array('INDUSTRYCLASSIFICATION' => 'name',
|
||||
|
||||
$config['master_tables_pkid'] = array('INDUSTRYCLASSIFICATION' => 'industry_classification_id','UOM' => 'uom_id','OCCUPATIONMEMBERS' => 'occupation_non_earning_member_id','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'type_of_activity_id','RELATIONSHIPS' => 'relationship_id','FREQUENCY' => 'frequency_id', 'CUSTOMERBEHAVIOUR' => 'customer_behaviour_id', 'CUSTOMERSEGMENT' => 'customer_segment_id','DESIGNATION' => 'designation_id', 'EARNINGMEMBERSSTATUS' => 'earning_member_status_id','EDUQUALIFICATION' => 'qualification_id','ADDRESSTYPE' => 'address_type_id','LOCALITY' => 'locality_id','ASSETTYPE' => 'id','PROPERTIES' => 'id','INVESTMENTTYPE' => 'id','INSURANCETYPE' => 'id','PERSONSMET' => 'person_met_id','RESIDENCEOWNERSHIP' => 'id','PAYMENTMODE' => 'id','ACCOUNTTYPE' => 'id','SOURCEOFOTHERINCOME' => 'id','MORTAGEPROPERTYTYPE' => 'id','ENDUSEOFLOAN' => 'enduse_of_loan_id','SOURCEOFBALANCETRANSFER' => 'id', 'STATUSOFCONSTRUCTION' => 'id','MORTAGEPROPERTIES' => 'mortage_property_id','BTLENDERLIST'=>'bt_lender_list_id','EXISTINGLOANTYPES'=>'existing_loan_type_id','PDAPPLICANTSDETAILS'=>'pd_co_applicant_id','RELATIONWITHBUSINESS'=>'relation_with_business_id','BUSINESSENTITYTYPE'=>'business_entity_type_id','COMPANYRELATIONSHIPS'=>'company_relationship_id','STATE'=>'state_id','CITY'=>'city_id','COUNTRY'=>'country_id','BOUNCEMASTER'=>'bounce_id','BUSINESSEXPENSES'=>'expense_item_id','BUSINESSINCOME'=>'business_income_id','COMMENTSONLOCALITY'=>'comments_on_locality_id','COMPANY'=>'name','LOCALITY'=>'locality_id','NONINDIVIDUALENTITIES'=>'non_individual_entity_id','PDFORMS'=>'form_id','PDLOCATIONAPPROACH'=>'pd_location_approach_id','PDTYPE'=>'pd_type_id','PDNOTIFICATION'=>'pdnotification_id','QUESTIONCATEGORY'=>'question_category_id','ROLES'=>'role_id','SUBPRODUCTS'=>'subproduct_id','TITLES'=>'title_id','PINCODE'=>'pincode_id','PRODUCTS'=>'product_id','ENTITYTYPE'=>'entity_type_id','PDTEAM'=>'pdteam_id','ENTITY'=>'entity_id','PDSTATUS'=>'pd_status_id','LISTOFMASTERS'=>'master_id','OTPREJECTION'=>'otp_rejection_id','ENDUSEOFTOPUP'=>'end_use_of_topup_id','VEHICLETYPE'=>'vehicle_type_id','PDOFFICERRECOMMENDATIONS'=>'pdofficer_recommendation_id','REGIONS'=>'region_id','PRICINGINFO'=>'pricing_info_id');
|
||||
|
||||
$config['parent_forms'] = array(0,10,7,4,6,8,9,20,5);// 0 added for dummy
|
||||
$config['parent_forms'] = array(0,10,7,4,6,8,9,20);// 0 added for dummy
|
||||
?>
|
||||
@ -552,6 +552,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$address['fk_pd_id'] = $pd_id;
|
||||
$address['is_primary'] = count($addresses) == 1 ? 1:0;
|
||||
$address['assigned_pd'] = count($addresses) == 1 ? $pd_id:null;
|
||||
$address_id = $this->PD_Model->saveRecords($address,PDADDRESS);
|
||||
if($address_key == 0)
|
||||
{
|
||||
@ -831,7 +832,7 @@ class PD_Controller extends REST_Controller {
|
||||
if(count($parent_pd_details))
|
||||
{
|
||||
$newpd['fk_lender_id'] = $parent_pd_details[0]['fk_lender_id'];
|
||||
$newpd['pd_date_of_initiation'] = date_format(date_create($parent_pd_details[0]['pd_date_of_initiation']),'Y-m-d');
|
||||
$newpd['pd_date_of_initiation'] = date_format(date_create($parent_pd_details[0]['pd_date_of_initiation']),'Y-d-m');
|
||||
$newpd['fk_entity_billing_id'] = $parent_pd_details[0]['fk_entity_billing_id'];
|
||||
$newpd['lender_applicant_id'] = $parent_pd_details[0]['lender_applicant_id'];
|
||||
$newpd['fk_product_id'] = $parent_pd_details[0]['fk_product_id'];
|
||||
@ -847,7 +848,7 @@ class PD_Controller extends REST_Controller {
|
||||
$newpd['parent_pd_id'] = $pd_details['parent_pd_id'];
|
||||
//$newpd['fk_pd_allocated_to'] = $pd_details['fk_pd_allocated_to'] ? $pd_details['fk_pd_allocated_to'] : null;
|
||||
//$newpd['scheduled_on'] = $pd_details['scheduled_on'] ? $pd_details['scheduled_on'] : null;
|
||||
//print_r($newpd);//die();
|
||||
|
||||
$newpd['fk_pd_template_id'] = $this->assignPDTempalate(array('lender' => $newpd['fk_lender_id'],'product' => $newpd['fk_product_id'],'customer_segment' => $newpd['fk_customer_segment']));
|
||||
|
||||
|
||||
@ -2386,6 +2387,43 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if($pd_form_id == 5)//address form
|
||||
{
|
||||
$fields = array('*');
|
||||
$where_condition_array = array('fk_pd_id' => $pd_id,'fk_form_id' =>$pd_form_id , 'isactive' => 1);
|
||||
$form_count = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
if(count($form_count))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = json_decode($form_count[0]['json']);
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
//get address details from address form
|
||||
$fields = array('*');
|
||||
$where_condition_array = array('assigned_pd' => $pd_id);
|
||||
$assigned_address = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDADDRESS);
|
||||
if(count($assigned_address))
|
||||
{
|
||||
$temp_address = $assigned_address[0];
|
||||
//print_r($temp_address);
|
||||
//construct address form jsn format here
|
||||
$address = array();
|
||||
$address[] = array('address' => $temp_address['addressline1'],'address_type' => '','address_type_others' => '','state'=>$temp_address['fk_state'],'city'=>$temp_address['fk_city'],'citySearch' =>'','stateSearch'=>'','citySearch'=>'','pinSearch' => '','pincode'=>$temp_address['pincode'],'pincode_others' => '','locality' => '','locality_others'=>'','pd_location' => '','comment_locality' => '','estimated_area' => '','uom' => '','uom_others'=>'');
|
||||
|
||||
$records['addressess'] = $address;
|
||||
$records['address_form_remark'] = 'From COnd';
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $records;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$fields = array('json','processed_json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id'=>$pd_form_id,'fk_pd_id'=>$pd_id);
|
||||
@ -5380,7 +5418,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function getPDImages_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$result_data = $this->PD_Model->getSignedPDDocsURL($records['pd_id'],$records['form_id']);
|
||||
$result_data = $this->PD_Model->getSignedPDDocsURL($records['pd_id'],$records['form_id'],$records['company_id']);
|
||||
if(count($result_data))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
@ -5398,13 +5436,13 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
public function saveBase64Images($pd_id,$form_id = null,$company_id,$data)
|
||||
public function saveBase64Images($pd_id,$form_id = null,$company_id = null,$data)
|
||||
{
|
||||
|
||||
$count = 0;
|
||||
$result = array();
|
||||
$pd_details = $this->PD_Model->getPDMasterDetails($pd_id);
|
||||
//print_r($pd_details);
|
||||
//print_r($data);die();
|
||||
|
||||
foreach($data as $iter => $doc)
|
||||
{
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 8.5 KiB |
@ -217,9 +217,9 @@ class PD_Model extends SPARQ_Model {
|
||||
/*
|
||||
*Get All PD Related Documents as signed and expired URL's from S3 Buckets
|
||||
*/
|
||||
public function getSignedPDDocsURL($pdid,$form_id = null)
|
||||
public function getSignedPDDocsURL($pdid,$form_id = null,$company_id)
|
||||
{
|
||||
// echo $pdid,$form_id;die();
|
||||
//echo $pdid,$form_id,$company_id;die();
|
||||
$document_lists = array();
|
||||
if($pdid != '' || $pdid != null)
|
||||
{
|
||||
@ -235,6 +235,12 @@ class PD_Model extends SPARQ_Model {
|
||||
{
|
||||
$where_condition_array['fk_form_id'] = $form_id;
|
||||
}
|
||||
|
||||
if($company_id != null)
|
||||
{
|
||||
$where_condition_array['company_id'] = $company_id;
|
||||
}
|
||||
|
||||
$document_lists = $this->selectRecords(PDDOCUMENTS,$where_condition_array);
|
||||
if(count($document_lists))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user