SMC CHGS 2
This commit is contained in:
parent
1cbce13e1a
commit
6b71af283d
@ -1306,10 +1306,11 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
$folder_to_check = XLPATH.'/tmp';
|
||||
// $modified_fname = $records['rand_key'].'~'.str_replace(' ','_',($_FILES['pd_excel_data']['name']));
|
||||
$modified_fname = str_replace(' ','_',($_FILES['pd_excel_data']['name']));
|
||||
$modified_fname = (explode('.',$_FILES['pd_excel_data']['name']));
|
||||
$modified_fname = (explode('.',$modified_fname));
|
||||
// print_r($modified_fname);die();
|
||||
$modified_fname = $modified_fname[0].'_'.date('Y-m-d_h-i-s').'.'.$modified_fname[1];
|
||||
// echo $modified_fname;
|
||||
// die();
|
||||
// echo $modified_fname;
|
||||
// die();
|
||||
// #TEMP
|
||||
// $sourcefile = $folder_to_check.'/'.$modified_fname;
|
||||
// $result_data = readexceldata::getExcelSectionData($sourcefile);
|
||||
@ -1343,13 +1344,15 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
{
|
||||
//update fk_pd_id in excel file list table
|
||||
$fields_to_insert['fk_pd_id'] = $records['fk_pd_id'];
|
||||
}
|
||||
$is_bucket_upload_sucess = 1;
|
||||
// disable old entries
|
||||
|
||||
// disable old entries
|
||||
$this->Common_Masters_Model->updateRecords(array('isactive' => 0),SMC_EXCEL_FILELIST,array('fk_pd_id' => $records['fk_pd_id']));
|
||||
|
||||
//have to do disable key 'is_reupload_data_fetched' to 0 in section data table
|
||||
$this->Common_Masters_Model->updateRecords(array('is_reupload_data_fetched' => 0),SMC_CREDIT_PD_SECTION_DATA,array('fk_pd_id' => $records['fk_pd_id']));
|
||||
}
|
||||
$is_bucket_upload_sucess = 1;
|
||||
|
||||
|
||||
//insert new records
|
||||
$id = $this->Common_Masters_Model->saveRecords($fields_to_insert,SMC_EXCEL_FILELIST);
|
||||
|
||||
@ -2065,10 +2065,10 @@ public function assignPDTempalate($data)
|
||||
if($this->get('createdby')) { $createdby = $this->get('createdby'); }
|
||||
if($this->get('lenderid'))
|
||||
{
|
||||
// $lenderid = $this->get('lenderid');
|
||||
// $smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //pk id of SMC in live and demo
|
||||
// if($lenderid == $smc_lender_id)
|
||||
// {
|
||||
$lenderid = $this->get('lenderid');
|
||||
$smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //pk id of SMC in live and demo
|
||||
if($lenderid == $smc_lender_id)
|
||||
{
|
||||
|
||||
// $this->load->model('User_Management_Model');
|
||||
// $user_details = $this->User_Management_Model->getUserDetails($createdby);
|
||||
@ -2082,7 +2082,7 @@ public function assignPDTempalate($data)
|
||||
// $lender_details = array('city' => $user_details['data'][0]['fk_city']);
|
||||
|
||||
// }
|
||||
// $createdby = '';
|
||||
$createdby = '';
|
||||
|
||||
}
|
||||
|
||||
@ -2204,18 +2204,18 @@ public function assignPDTempalate($data)
|
||||
if($pd_lender = $smc_lender_id)
|
||||
{
|
||||
$createdby = '';
|
||||
$this->load->model('User_Management_Model');
|
||||
$user_details = $this->User_Management_Model->getUserDetails($createdby);
|
||||
if($user_details['data'][0]['user_role'] == 26)//Credit Manager
|
||||
{
|
||||
$pd_officer_id = $createdby;
|
||||
// $this->load->model('User_Management_Model');
|
||||
// $user_details = $this->User_Management_Model->getUserDetails($createdby);
|
||||
// if($user_details['data'][0]['user_role'] == 26)//Credit Manager
|
||||
// {
|
||||
// $pd_officer_id = $createdby;
|
||||
|
||||
}
|
||||
else if($user_details['data'][0]['user_role'] == 27)//Reg Credit Manager
|
||||
{
|
||||
$pd_city = array( $user_details['data'][0]['fk_city'] );
|
||||
// }
|
||||
// else if($user_details['data'][0]['user_role'] == 27)//Reg Credit Manager
|
||||
// {
|
||||
// $pd_city = array( $user_details['data'][0]['fk_city'] );
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1474,7 +1474,7 @@ public function filterSalesPDList_post() {
|
||||
//die();
|
||||
}
|
||||
}
|
||||
// print_r($view_data['pd_section_data'][8]);die();
|
||||
// print_r($view_data['pd_section_data'][1]);die();
|
||||
$view_data['smc_images'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$view_data['satellite'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
//print_r(count($view_data['smc_images']));die();
|
||||
|
||||
@ -59,6 +59,8 @@ class smc_creditpd
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// print_r($return_data);die();
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
@ -66,6 +68,7 @@ class smc_creditpd
|
||||
static function getBorrowerSectionData($section)
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
|
||||
$person_met = '';
|
||||
foreach ($json['borrower_details'] as $key => $value)
|
||||
{
|
||||
@ -74,6 +77,17 @@ class smc_creditpd
|
||||
{
|
||||
$person_met .= $value['borrower_name'].', ';
|
||||
}
|
||||
|
||||
if(isset($value['mobile_numbers']) && count($value['mobile_numbers']))
|
||||
{
|
||||
$mobile_numbers = '';
|
||||
foreach ($value['mobile_numbers'] as $k => $smn)
|
||||
{
|
||||
if((count($value['mobile_numbers']) - 1) == $k){$mobile_numbers .= ($smn['mobile_no']); break;}
|
||||
$mobile_numbers .= ($smn['mobile_no'].' - ');
|
||||
}
|
||||
$json['borrower_details'][ $key ] ['mobile_numbers'] = $mobile_numbers;
|
||||
}
|
||||
}
|
||||
// if(!isset($json['person_met']))
|
||||
// {
|
||||
|
||||
@ -13,7 +13,7 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer,$user_type,$createdby)// $page represents mysql offset
|
||||
{
|
||||
//\echo $pd_agency_id;die();
|
||||
// echo $lenderid;die();
|
||||
$this->db->SELECT('PDTRIGGER.pd_id,PDTRIGGER.imgc_fin_institute,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PRODUCTS.prod_catagory,PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as master_updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name,AGENCY.short_name as agency_short_name,AGENCY.is_qc_enabled, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,PDTRIGGER.is_notify_enabled,(SELECT DATE_FORMAT(createdon,"%d/%m/%Y") FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon,ENTITYFININSTITUTION.institute_name as fin_institute_name,PDTRIGGER.is_video_merged,PDTRIGGER.vendor_status');
|
||||
//$this->db->SELECT('pd_sno,fk_lender_id,pd_agency_id,pd_status,vendor_status');
|
||||
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
|
||||
@ -160,7 +160,8 @@ class PD_Model extends SPARQ_Model {
|
||||
$this->db->ORDER_BY('PDTRIGGER.pd_id',$sort);
|
||||
//$this->db->LIMIT($limit,$page);
|
||||
$result_array = $this->db->GET()->result_array();
|
||||
// print_r($this->db->last_query());die();
|
||||
// echo count($result_array);
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
if(count($result_array) != 0)
|
||||
{
|
||||
|
||||
@ -288,7 +288,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php
|
||||
foreach ($pd_section_data[1]['borrower_details'] as $key1 => $value1)
|
||||
{
|
||||
echo '<tr><td colspan="1" class = "tdcenteralign">'.$value1['borrower_type'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['borrower_name'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['entity_type'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['designation'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['relationship'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['relationship_to'].'</td> <td colspan="1" class = "tdcenteralign">'.(isset($value1['borrower_age']) && !empty($value1['borrower_age']) ? $value1['borrower_age'] : 'NA').'</td> <td colspan="1" class = "tdcenteralign">'.(isset($value1['numbers_of_years_business_running']) && !empty($value1['numbers_of_years_business_running']) && (!strcasecmp($value1['entity_type'],'Individual'))? $value1['numbers_of_years_business_running'] : 'NA').'</td></tr>';
|
||||
echo '<tr><td colspan="1" class = "tdcenteralign">'.$value1['borrower_type'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['borrower_name'].(isset($value1['mobile_numbers']) && $value1['mobile_numbers'] != '' ? ('<br>('. $value1['mobile_numbers'] .')'): '').'</td> <td colspan="1" class = "tdcenteralign">'.$value1['entity_type'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['designation'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['relationship'].'</td> <td colspan="1" class = "tdcenteralign">'.$value1['relationship_to'].'</td> <td colspan="1" class = "tdcenteralign">'.(isset($value1['borrower_age']) && !empty($value1['borrower_age']) ? $value1['borrower_age'] : 'NA').'</td> <td colspan="1" class = "tdcenteralign">'.(isset($value1['numbers_of_years_business_running']) && !empty($value1['numbers_of_years_business_running']) && (!strcasecmp($value1['entity_type'],'Individual'))? $value1['numbers_of_years_business_running'] : 'NA').'</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user