CUSTOMER IMG API MODIFIED FOR QC IMG
This commit is contained in:
parent
0b6ded2013
commit
745a76512b
@ -9230,7 +9230,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
//print_r(count($this->existing_imges));
|
||||
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);
|
||||
$final_data[] = array('img_key' =>'common_image','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => null,'pd_document_id' => $value['pd_document_id']);
|
||||
unset($this->existing_imges[$key]);
|
||||
}
|
||||
elseif($value['pd_document_title'] != 'satellite' && $value['fk_form_id'] == 24)
|
||||
@ -9254,7 +9254,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
if($is_listed)
|
||||
{
|
||||
$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);
|
||||
$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,'pd_document_id' => $value['pd_document_id']);
|
||||
|
||||
//break;
|
||||
}
|
||||
@ -9270,7 +9270,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",'pd_document_id' => $value['pd_document_id']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9320,7 +9320,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,'pd_document_id' => $value['pd_document_id']);
|
||||
unset($this->existing_imges[$key]);
|
||||
return $arr;
|
||||
|
||||
@ -9329,7 +9329,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
{
|
||||
|
||||
//echo 'HOLD';
|
||||
$arr = array('img_key' => 'person_met_id','img_name' => $this->photo_names['person_met_id'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['person_met_id'][1],'is_multiple' => 0);
|
||||
$arr = array('img_key' => 'person_met_id','img_name' => $this->photo_names['person_met_id'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['person_met_id'][1],'is_multiple' => 0,'pd_document_id' => $value['pd_document_id']);
|
||||
unset($this->existing_imges[$key]);
|
||||
return $arr;
|
||||
// unset($this->photo_names['selfie_with_person_met']);
|
||||
@ -9339,7 +9339,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
{
|
||||
|
||||
//echo "APPROACH";
|
||||
$arr = array('img_key' => 'approach_to_pd_location','img_name' => $this->photo_names['approach_to_pd_location'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['approach_to_pd_location'][1],'is_multiple' => 0);
|
||||
$arr = array('img_key' => 'approach_to_pd_location','img_name' => $this->photo_names['approach_to_pd_location'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['approach_to_pd_location'][1],'is_multiple' => 0,'pd_document_id' => $value['pd_document_id']);
|
||||
unset($this->existing_imges[$key]);
|
||||
return $arr;
|
||||
// unset($this->photo_names['selfie_with_person_met']);
|
||||
@ -9349,7 +9349,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
{
|
||||
|
||||
//echo "APPROACH";
|
||||
$arr = array('img_key' => 'name_board_seen','img_name' => $this->photo_names['approach_to_pd_location'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['approach_to_pd_location'][1],'is_multiple' => 0);
|
||||
$arr = array('img_key' => 'name_board_seen','img_name' => $this->photo_names['name_board_seen'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['name_board_seen'][1],'is_multiple' => 0,'pd_document_id' => $value['pd_document_id']);
|
||||
unset($this->existing_imges[$key]);
|
||||
return $arr;
|
||||
// unset($this->photo_names['selfie_with_person_met']);
|
||||
@ -9366,17 +9366,17 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$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]);
|
||||
$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'],'img_name' => $value['pd_document_title'],'pd_document_id' => $value['pd_document_id'])),'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']);
|
||||
$multiple_img_data[$current_img_key]['img_data'][] = array('img_url' => $value['doc_url'],'img_name' => $value['pd_document_title'],'pd_document_id' => $value['pd_document_id']);
|
||||
}
|
||||
|
||||
}
|
||||
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]);
|
||||
$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],'pd_document_id' => $value['pd_document_id']);
|
||||
return $arr;
|
||||
}
|
||||
unset($this->existing_imges[$key]);
|
||||
|
||||
@ -528,7 +528,7 @@ class PD_Model extends SPARQ_Model {
|
||||
//get pd Master Details
|
||||
$pd_master_detials = $this->getPDMasterDetails($pdid);
|
||||
|
||||
$arrayForText = array("fk_lender_id" => "Lender", "fk_entity_billing_id" => "Billing ID", "lender_applicant_id" => "Applicant Ref ID", "pd_date_of_initiation" => "PD Date of Initiation", "fk_product_id" => "Product", "fk_subproduct_id" => "Sub Product","fk_pd_type" => "PD Type", "pd_status" => "PD Status", "pd_specific_clarification"=> "PD Specific Clarification","fk_pd_allocation_type" => "Allocation Type", "fk_pd_allocated_to" => "Allocated Person", "fk_pd_template_id" => "PD Tempale", "fk_customer_segment" => "Customer Segment", "pd_officier_final_judgement" => "PD Officer Finale Judgement", "pd_agency_id" => "PD Agency", "loan_amount" => "Loan Amount", "addressline1" => "Addressline1", "addressline2" => "Addressline1", "addressline3" => "Addressline1", "fk_city" => "City", "fk_state" => "State", "pincode" => "Pincode", "bounce_reason" => "Bounce Reason", "executive_id" => "PD Executive","central_pd_officer_id"=>"Central PD Officer","pd_contact_person" => "Lender Contact Person", "pd_contact_mobileno" => "Lender Contact Mobile Number", "scheduled_on" => "Scheduled On", "completed_on" => "Completed On",'fk_address_id' => 'PD Address Map','fk_primary_address_id' => 'Primary Address');
|
||||
$arrayForText = array("fk_lender_id" => "Lender", "fk_entity_billing_id" => "Billing ID", "lender_applicant_id" => "Applicant Ref ID", "pd_date_of_initiation" => "PD Date of Initiation", "fk_product_id" => "Product", "fk_subproduct_id" => "Sub Product","fk_pd_type" => "PD Type", "pd_status" => "PD Status", "pd_specific_clarification"=> "PD Specific Clarification","fk_pd_allocation_type" => "Allocation Type", "fk_pd_allocated_to" => "Allocated Person", "fk_pd_template_id" => "PD Tempale", "fk_customer_segment" => "Customer Segment", "pd_officier_final_judgement" => "PD Officer Finale Judgement", "pd_agency_id" => "PD Agency", "loan_amount" => "Loan Amount", "addressline1" => "Addressline1", "addressline2" => "Addressline1", "addressline3" => "Addressline1", "fk_city" => "City", "fk_state" => "State", "pincode" => "Pincode", "bounce_reason" => "Bounce Reason", "executive_id" => "PD Executive","central_pd_officer_id"=>"Central PD Officer","pd_contact_person" => "Lender Contact Person", "pd_contact_mobileno" => "Lender Contact Mobile Number", "scheduled_on" => "Scheduled On", "completed_on" => "Completed On",'fk_address_id' => 'PD Address Map','fk_primary_address_id' => 'Primary Address',"vendor_status" => 'Vendor Status');
|
||||
|
||||
$this->db->SELECT('COMMONMASTER.log_id, COMMONMASTER.primary_key, COMMONMASTER.table_name, COMMONMASTER.field_name, COMMONMASTER.old_value, COMMONMASTER.new_value, COMMONMASTER.fk_createdby, DATE_FORMAT(COMMONMASTER.createdon,"%D %b %Y at %h:%i:%s %p") as createdon,COMMONMASTER.createdon raw_date_createdon,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,ENTITYBILLINGOLD.billing_name as old_billing_name,ENTITYBILLINGNEW.billing_name as new_billing_name,ENTITYOLD.full_name as old_entity_name,ENTITYNEW.full_name as new_entity_name,PRODUCTSOLD.abbr as old_product,PRODUCTSNEW.abbr as new_product,SUBPRODUCTSOLD.abbr as old_sub_product,SUBPRODUCTSNEW.abbr as new_sub_product,PDTYPEOLD.type_name as old_type_name,PDTYPENEW.type_name as new_type_name,concat(ALLOCATEDOLD.first_name," ",ALLOCATEDOLD.last_name) as old_allocated_to,concat(ALLOCATEDNEW.first_name," ",ALLOCATEDNEW.last_name) as new_allocated_to,TEMPLATEOLD.template_name as old_template_name,TEMPLATENEW.template_name as new_template_name,CUSTOMERSEGMENTOLD.name as old_cs_name,CUSTOMERSEGMENTNEW.name as new_cs_name,AGENCYOLD.full_name as old_agencyname,AGENCYNEW.full_name as new_agencyname,CITYOLD.name as old_city,CITYNEW.name as new_city,STATEOLD.name as old_state,STATENEW.name as new_state,concat(EXECUTIVEOLD.first_name," ",EXECUTIVEOLD.last_name) as old_executive,concat(EXECUTIVENEW.first_name," ",EXECUTIVENEW.last_name) as new_executive,concat(CENTRALPDOLD.first_name," ",CENTRALPDOLD.last_name) as old_central_pd_officer_id,concat(CENTRALPDNEW.first_name," ",CENTRALPDNEW.last_name) as new_central_pd_officer_id,ALLOCATIONOLD.pd_allocation_type_name as old_allocation_type,ALLOCATIONNEW.pd_allocation_type_name as new_allocation_type,BOUNCEMASTEROLD.bounce_reason_name as old_bounce_reason,BOUNCEMASTERNEW.bounce_reason_name as new_bounce_reason,PINCODEOLD.pincode as old_pincode,PINCODENEW.pincode as new_pincode,PDTRIGGER.other_pincode');
|
||||
$this->db->FROM(COMMONMASTER.' as COMMONMASTER');
|
||||
@ -805,6 +805,61 @@ class PD_Model extends SPARQ_Model {
|
||||
// $actual_logs[$log_key]['user'] = $user;
|
||||
// $actual_logs[$log_key]['time'] = $time;
|
||||
// }
|
||||
|
||||
|
||||
break;
|
||||
case 'vendor_status':
|
||||
|
||||
$data_from_remarks = $this->selectCustomRecords(array('remark'),array('fk_pd_id' => $pdid,'is_revert_remark' => 1),PDREMARKS);
|
||||
$log_string = $arrayForText[$log['field_name']].' Changed From "'.$log['old_value'].'" to "'.$log['new_value'].'"';
|
||||
$user = $log['createdby'];
|
||||
$time = $log['createdon'];
|
||||
$actual_logs[$log_key]['user'] = $user;
|
||||
$actual_logs[$log_key]['time'] = $time;
|
||||
$actual_logs[$log_key]['log'] = $log_string;
|
||||
if($log['new_value'] == ALLOCATED)
|
||||
{
|
||||
// if($pd_master_detials[0]['fk_pd_type'] == 1)//FULL PD
|
||||
// {
|
||||
// $actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to PD Officer','display_value' => $pd_master_detials[0]['pd_allocated_to']);
|
||||
// }
|
||||
if(!$log['old_value'])//SMART PD
|
||||
{
|
||||
$actual_logs[$log_key]['log'] = 'PD Allocated to Vendor PD Officer';
|
||||
// $actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to Central PD Officer','display_value' => $pd_master_detials[0]['centralofficer']);
|
||||
// $actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to Executive PD Officer','display_value' => $pd_master_detials[0]['executive_name']);
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to PD Officer','display_value' => $pd_master_detials[0]['pd_allocated_to']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// $actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to Central PD Officer','display_value' => $pd_master_detials[0]['centralofficer']);
|
||||
// $actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to Executive PD Officer','display_value' => $pd_master_detials[0]['executive_name']);
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Allocated to PD Officer','display_value' => $pd_master_detials[0]['pd_allocated_to']);
|
||||
}
|
||||
// else //Tele PD
|
||||
// {
|
||||
// $actual_logs[$log_key]['meta_data']['Allocated to Central PD Officer'] = $pd_master_detials[0]['centralofficer'];
|
||||
// }
|
||||
}
|
||||
else if($log['new_value'] == SCHEDULED)
|
||||
{
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Scheduled Date','display_value' => $pd_master_detials[0]['scheduled_date_for_log']);
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name' => 'Scheduled Time','display_value' => $pd_master_detials[0]['scheduled_time_for_log']);
|
||||
}
|
||||
else if($log['new_value'] == BOUNCED)
|
||||
{
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name'=>'Rejected Reason','display_value' => $pd_master_detials[0]['bounce_reason_name']);
|
||||
if($pd_master_detials[0]['bounce_reason_others'] != "" || $pd_master_detials[0]['bounce_reason_others'] != null)
|
||||
{
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name'=>'Rejected Reason Others','display_value'=> $pd_master_detials[0]['bounce_reason_others']);
|
||||
}
|
||||
}
|
||||
else if($log['new_value'] == COMPLETED)// && $log['old_value'] == QC_COMPLETED)
|
||||
{
|
||||
$actual_logs[$log_key]['meta_data'][] = array('display_name'=>'Remark of status change','display_value'=> $data_from_remarks[ $revert_remark_iteration ]['remark']);
|
||||
$revert_remark_iteration++;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case 'pd_status':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user