Duplicated key Fixes for cetdatapush : ps
This commit is contained in:
parent
4d116f1c1d
commit
8a5376c9e9
@ -467,7 +467,9 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
$filter_form_id[$key] = $value['fk_form_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# LFMP key_stakeholders
|
||||
if ($mater_details[0]['product_abbr'] == 'LFMP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) {
|
||||
$LFMP_KeyStackholders = $pd_section_data[5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
@ -501,8 +503,12 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
}
|
||||
} // ### LFMP key_stakeholders ends
|
||||
// print_r($filter_form_id);die();
|
||||
|
||||
|
||||
$officer_id = isset($mater_details[0]['fk_updatedby']) ? $mater_details[0]['fk_updatedby'] : '';
|
||||
$visit_date = isset($mater_details[0]['pd_visit_date']) ? $mater_details[0]['pd_visit_date'] : '';
|
||||
|
||||
# Additional Fields For officer
|
||||
if (!empty($officer_id)) {
|
||||
$officer_details = $this->SMC_Credit_PD_Model->selectCustomRecords(array('userid as officer_id', 'email', 'mobile_no', 'concat(first_name," ",last_name) as officer'), array('userid' => $officer_id), USERPROFILE);
|
||||
if (!empty($officer_details)) {
|
||||
@ -512,6 +518,73 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Additional Fields For address
|
||||
if(!empty($CETAPP_creditPD_data['Address details'])){
|
||||
$CETAPP_creditPD_data['Address details']['state_name'] = isset($mater_details[0]['state_name']) ? $mater_details[0]['state_name'] : '' ;
|
||||
$CETAPP_creditPD_data['Address details']['city_name'] = isset($mater_details[0]['city_name']) ? $mater_details[0]['city_name'] : '' ;
|
||||
$CETAPP_creditPD_data['Address details']['pincode'] = isset($mater_details[0]['pincode_others']) ? $mater_details[0]['pincode_others'] : (isset($mater_details[0]['pincode']) ? $mater_details[0]['pincode'] : '') ;
|
||||
}
|
||||
|
||||
# Asset Duplication key - Fixes
|
||||
if (!empty($CETAPP_creditPD_data['Business Assets'])) {
|
||||
//$CETAPP_creditPD_data["Business Assets"]
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_ownership_type"]) && $CETAPP_creditPD_data["Business Assets"]["business_ownership_type"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_ownership_type_master"] = $CETAPP_creditPD_data["Business Assets"]["business_ownership_type"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_ownership_type"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_monthly_rented_amt"]) && $CETAPP_creditPD_data["Business Assets"]["business_monthly_rented_amt"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_monthly_rented_amt_master"] = $CETAPP_creditPD_data["Business Assets"]["business_monthly_rented_amt"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_monthly_rented_amt"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"]) && $CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner_master"] = $CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_months"]) && $CETAPP_creditPD_data["Business Assets"]["business_months"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_months_master"]= $CETAPP_creditPD_data["Business Assets"]["business_months"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_months"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_years"]) && $CETAPP_creditPD_data["Business Assets"]["business_years"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_years"]=$CETAPP_creditPD_data["Business Assets"]["business_years"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_years"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_approximate_market_value"]) && $CETAPP_creditPD_data["Business Assets"]["business_approximate_market_value"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_approximate_market_value_master"]=$CETAPP_creditPD_data["Business Assets"]["business_approximate_market_value"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_approximate_market_value"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_vintage"]) && $CETAPP_creditPD_data["Business Assets"]["business_vintage"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_vintage_master"]=$CETAPP_creditPD_data["Business Assets"]["business_vintage"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_vintage"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_purchase_year"]) && $CETAPP_creditPD_data["Business Assets"]["business_purchase_year"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_purchase_year_master"]=$CETAPP_creditPD_data["Business Assets"]["business_purchase_year"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_purchase_year"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_emi"]) && $CETAPP_creditPD_data["Business Assets"]["business_emi"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_emi_master"]=$CETAPP_creditPD_data["Business Assets"]["business_emi"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_emi"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"]) && $CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner_master"]=$CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_name_of_the_owner"]) ;}
|
||||
|
||||
if(isset($CETAPP_creditPD_data["Business Assets"]["business_owner_name"]) && $CETAPP_creditPD_data["Business Assets"]["business_owner_name"] !=''){
|
||||
$CETAPP_creditPD_data["Business Assets"]["business_owner_name_master"]=$CETAPP_creditPD_data["Business Assets"]["business_owner_name"];
|
||||
unset($CETAPP_creditPD_data["Business Assets"]["business_owner_name"]) ;}
|
||||
|
||||
}
|
||||
|
||||
# stock Duplication key - Fixes
|
||||
if (!empty($CETAPP_creditPD_data['Stock details'])) {
|
||||
if(isset($CETAPP_creditPD_data["Stock details"]["estimated_uom"]) && $CETAPP_creditPD_data["Business Assets"]["estimated_uom"] !=''){
|
||||
$CETAPP_creditPD_data["Stock details"]["estimated_uom_master"] = $CETAPP_creditPD_data["Business Assets"]["estimated_uom"];
|
||||
unset($CETAPP_creditPD_data["Stock details"]["estimated_uom"]) ;}
|
||||
}
|
||||
|
||||
# Fields Filtering For photograph
|
||||
if($dummy_flag == 0){
|
||||
$photograph_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('img_name','IF(img_name="satellite","satellite.png",rand_name) AS img'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||
if(count($photograph_data)>0){
|
||||
@ -2002,7 +2075,7 @@ public function filterSalesPDList_post() {
|
||||
}
|
||||
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
|
||||
}// ### LFMP key_stakeholders ends
|
||||
|
||||
// print_r($view_data['pd_section_data']);die();
|
||||
$view_data['report_attachments'] = (new report_attachments)->getSMCReportAttchments($records['pd_id'],$view_data['pd_master_details'][0]['random_string'],$view_data['pd_master_details']);
|
||||
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
|
||||
@ -2010,7 +2083,7 @@ public function filterSalesPDList_post() {
|
||||
}else{
|
||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||
}
|
||||
// print_r($html_content);exit();
|
||||
//print_r($html_content);exit();
|
||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||
$new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant'];
|
||||
|
||||
|
||||
@ -189,8 +189,7 @@ class smc_creditpd
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
$applicant_details = applicantname_grabber::getLatestApplicantsName($section['fk_pd_id']);
|
||||
$json['business_name_of_the_owner_id'] = $json['business_name_of_the_owner'];
|
||||
$json['business_name_of_the_owner'] = (isset($json['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($json['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
$json['business_owner_name'] = (isset($json['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($json['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
|
||||
// $company[$json['key_stakeholders'][$i]['company_name']]
|
||||
// print_r($json);die();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user