CET Credit Data push Missing Fixes : ps

This commit is contained in:
VE10-Sanjeev 2023-07-12 11:29:53 +05:30
parent 6f649f1231
commit 9847b68f68

View File

@ -56,7 +56,7 @@ class smc_creditpd
$return_data = SELF::getAddressSectionData($section);
break;
case 8://assest
$return_data = SELF::getAssestSectionData($section);
$return_data = SELF::getAssestSectionData($section,$company);
// print_r($return_data);
break;
@ -137,6 +137,7 @@ class smc_creditpd
$mobile_numbers .= ($smn['mobile_no'].',<br>');
}
$json['borrower_details'][ $key ] ['mobile_numbers'] = $mobile_numbers;
$json['borrower_details'][ $key ] ['mobile_no'] = $mobile_numbers;
if($mobile_numbers)
{
$mobile_numbers_array[('##'.$inx.'##')] = '( ' . str_replace('<br>', '', $mobile_numbers) . ' ) ';
@ -184,16 +185,27 @@ class smc_creditpd
return $json;
}
static function getAssestSectionData($section)
static function getAssestSectionData($section,$company)
{
$json = json_decode($section['json'],true);
// print_r($json);
$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');
// $company[$json['key_stakeholders'][$i]['company_name']]
// print_r($json);die();
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
// $CI =&get_instance();
// $CI->load->model('PD_Model');
if(isset($json['business_assets_details']) && is_array($json['business_assets_details']) && count($json['business_assets_details']))
{
$applicant_details = applicantname_grabber::getLatestApplicantsName($section['fk_pd_id']);
{
// print_r($json['business_assets_details']);die();
for($i=0;$i<count($json['business_assets_details']);$i++)
{
$json['business_assets_details'][$i]['business_owner_name'] = (isset($json['business_assets_details'][$i]['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($json['business_assets_details'][$i]['business_name_of_the_owner'],$applicant_details)): 'NA');
$json['business_assets_details'][$i]['company_name_id'] = $json['business_assets_details'][$i]['company_name']; // here company_name comes id. due to creit pd data push changed into company_name_id
$json['business_assets_details'][$i]['company_name'] = (isset($json['business_assets_details'][$i]['company_name']) ? $company[$json['business_assets_details'][$i]['company_name']] : 'NA'); // here company_name comes id due to creit pd data push changed into company_name key la company names
}
$asset_type = array('2' => 'Property','3' => 'Vehicle','4' => 'Equipments and machinery','5' => 'Jewellery','6' => 'Life Insurance Policy','7' => 'Investments','1' => 'Others');
$address_type = array('2' => 'Clinic','3' => 'Factory','4' => 'Warehouse / Godown','5' => 'Shop','6' => 'Residence','7' => 'Residence cum Office','1' => 'Others','8' => 'Industrial Shed','9'=> 'Workshop','10'=> 'Business Centre','11'=> 'Shared Office','12'=> 'Office');
$vehicle_type = array('2' => 'Car/Jeep','3' => 'Truck/ Bus','4' => 'Rickshaw/Tempo','5' => 'Tractor','6' => 'Two Wheeler','1' => 'Others');