DATA DUMP APP NAME GRAPPER REPORT ISSUES
This commit is contained in:
parent
5c5c7cf033
commit
ce557ba184
@ -89,7 +89,7 @@ $autoload['drivers'] = array();
|
||||
|
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check');
|
||||
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
|
||||
@ -598,5 +598,12 @@ defined('APP_VERSION_INFOID') OR define('APP_VERSION_INFOID','version_info_id');
|
||||
defined('D_GEN_RELATIONSHIP') OR define('D_GEN_RELATIONSHIP','d_gen_relationship');
|
||||
defined('D_GENERAL_IND') OR define('D_GENERAL_IND','d_general_ind');
|
||||
|
||||
defined('D_BUSINESS_RELATINSHIP') OR define('D_BUSINESS_RELATINSHIP','d_business_relatinship');
|
||||
defined('D_BUSIENSS_TYPE') OR define('D_BUSIENSS_TYPE','d_busienss_type');
|
||||
defined('D_BUSINESS_PRODUCTS') OR define('D_BUSINESS_PRODUCTS','d_business_products');
|
||||
defined('D_BUSINESS_FORM') OR define('D_BUSINESS_FORM','d_business_form');
|
||||
defined('D_BUSINESS_RELATINSHIP') OR define('D_BUSINESS_RELATINSHIP','d_business_relatinship');
|
||||
defined('D_BUSINESS_PARTNERS') OR define('D_BUSINESS_PARTNERS','d_business_partners');
|
||||
|
||||
|
||||
|
||||
|
||||
84
api/application/controllers/Data_Dump_Controller.php
Normal file
84
api/application/controllers/Data_Dump_Controller.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: kms
|
||||
* Date: 11/13/17
|
||||
* Time: 7:40 PM
|
||||
*/
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
include_once APPPATH.'/vendor/autoload.php';
|
||||
|
||||
/**
|
||||
* This is an example of a few basic user interaction methods you could use
|
||||
* all done with a hardcoded array
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @subpackage Rest Server
|
||||
* @category Controller
|
||||
* @author
|
||||
* @license MIT
|
||||
* @link
|
||||
*/
|
||||
class Data_Dump_Controller extends REST_Controller {
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
$this->load->model('PD_Model','PD_Model');
|
||||
$this->load->model('Data_Dump_Model','Data_Dump_Model');
|
||||
//$this->load->library('AWS_S3');
|
||||
}
|
||||
|
||||
public function getRawData_get()
|
||||
{
|
||||
|
||||
$pdid = $this->get('pdid');
|
||||
$rs = $this->get('rs');
|
||||
$pd_processed_forms = array();
|
||||
$master = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
|
||||
if($pdid != '')// && $rs != '')
|
||||
{
|
||||
$this->load->helper('data_dump');
|
||||
|
||||
for($i = 1;$i<=30;$i++)
|
||||
{
|
||||
$fields = array('processed_json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
|
||||
|
||||
$pd_processed_forms[$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
|
||||
// $fields2 = array('*');
|
||||
// $data['pd_images'][$i] = $this->PD_Model->getSignedPDDocsURL($pdid,$i,null,null,null,'report');
|
||||
}
|
||||
|
||||
//get General form dump
|
||||
$gen_data_dump = array();
|
||||
if(isset($pd_processed_forms[18]))
|
||||
{
|
||||
$gen_data = (json_decode($pd_processed_forms[18][0]['processed_json'],TRUE));
|
||||
//print_r($gen_data);die();
|
||||
$gen_data_dump = DATA_DUMP::convertGeneralDetailsForm($gen_data,$master);
|
||||
print_r($gen_data_dump);
|
||||
$this->Data_Dump_Model->saveGenDumpData($gen_data_dump);
|
||||
}
|
||||
if(isset($pd_processed_forms[13]))
|
||||
{
|
||||
if(array_key_exists('company_data', $gen_data_dump) && count($gen_data_dump))
|
||||
{
|
||||
$business_data = (json_decode($pd_processed_forms[13][0]['processed_json'],TRUE));
|
||||
//print_r($business_data);die();
|
||||
$business_data_dump = DATA_DUMP::convertBusinessDetailsForm($business_data,$master,$gen_data_dump['company_data']);
|
||||
print_r($business_data_dump);
|
||||
$this->Data_Dump_Model->saveBusinessDUmpData($business_data_dump);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -2807,6 +2807,7 @@ public function getPDFormDetailsJSON_post()
|
||||
log_message('ERROR',$custom_log_info);
|
||||
|
||||
$result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,13,$company_id,null,null,null,'report');
|
||||
|
||||
foreach($result_data as $b_key => $b_value)
|
||||
{
|
||||
if($b_value['pd_document_title'] == 'shop_eat_act_cert_pic')
|
||||
@ -2846,23 +2847,30 @@ public function getPDFormDetailsJSON_post()
|
||||
$temp_rec['eb_bill_pic'] = $b_value['doc_url'];
|
||||
}
|
||||
|
||||
|
||||
if(isset($temp_rec['documents']) && count($temp_rec['documents']))
|
||||
{
|
||||
foreach ($temp_rec['documents'] as $key => $value) {
|
||||
|
||||
if($value['document'] == $b_value['pd_document_title'])
|
||||
$temp_iter = $temp_rec['documents'];
|
||||
|
||||
foreach ($temp_iter as $key => $value) {
|
||||
|
||||
if( !strcasecmp($value['document'],trim($b_value['pd_document_title'])) && $value['document_pic'])
|
||||
{
|
||||
$temp_rec['documents'][$key]['document_pic'] = $b_value['doc_url'];
|
||||
//unset($temp_iter[$key]);
|
||||
//print_r($temp_iter);
|
||||
break;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp_rec['documents'][$key]['document_pic'] = '';
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// $temp_rec['documents'][$key]['document_pic'] = false;
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//die();
|
||||
$rec[0]['json'] = json_encode($temp_rec);
|
||||
$custom_log_info = '###Get Business IMG AWS urls & attach into JSON Function End - ('. $pd_id.' - '. $pd_form_id.') - ' . date('Y-m-d H:i:s A');
|
||||
log_message('ERROR',$custom_log_info);
|
||||
@ -5967,7 +5975,11 @@ public function getPDFormDetailsJSON_post()
|
||||
}
|
||||
//print_r(json_decode($data['pd_processed_forms'][18][0]['processed_json']));die();
|
||||
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,'common',null,'report');
|
||||
//print_r($data['pd_images']);//die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true));
|
||||
// print_r($data['pd_images'][11]);
|
||||
|
||||
// $it = array_filter($data['pd_images'][11],function($d){ if($d['company_id'] == 2){ echo $d['company_id'].'TRUE';return 1;}else {echo $d['company_id'].'FALSE'; return 0;} });
|
||||
// print_r($it);
|
||||
// die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true));
|
||||
// die();
|
||||
//echo "*******************************************";
|
||||
|
||||
|
||||
24
api/application/helpers/applicantname_grabber_helper.php
Normal file
24
api/application/helpers/applicantname_grabber_helper.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
class applicantname_grabber
|
||||
{
|
||||
|
||||
public static function getLatestApplicantsName($pd_id)
|
||||
{
|
||||
$CI =&get_instance();
|
||||
$CI->load->model('PD_Model');
|
||||
return ( $CI->PD_Model->selectCustomRecords(array('pd_co_applicant_id','applicant_name'),array('fk_pd_id' => $pd_id),PDAPPLICANTSDETAILS));
|
||||
}
|
||||
|
||||
public static function getApplicantsNameById($id,$latest_applicants_names)
|
||||
{
|
||||
foreach ($latest_applicants_names as $key => $value) {
|
||||
|
||||
if($id == $value['pd_co_applicant_id'])
|
||||
{
|
||||
return $value['applicant_name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -3,9 +3,10 @@
|
||||
class Assetsform
|
||||
{
|
||||
// other asset details
|
||||
public static function getOthersAssetsDetails($values){
|
||||
public static function getOthersAssetsDetails($values,$pdid){
|
||||
$mergeResult=array();
|
||||
// print_r($values);die();
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
foreach($values as $key => $fetchVal){
|
||||
$storeValue=array();
|
||||
if(isset($fetchVal['assets_mode_master']) && ($fetchVal['assets_mode_master'] != '' || $fetchVal['assets_mode_master'] != null))
|
||||
@ -18,7 +19,7 @@ public static function getOthersAssetsDetails($values){
|
||||
}
|
||||
else
|
||||
{
|
||||
$assest_owners_name .= $owner['name']. ' , ';
|
||||
$assest_owners_name .= $owner['group_id'] == 1 ? $owner['name']. ' , ' : APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$latest_applicants_names).' , ';
|
||||
}
|
||||
|
||||
}
|
||||
@ -31,8 +32,9 @@ public static function getOthersAssetsDetails($values){
|
||||
|
||||
$storeValue['assets_mode'] = $fetchVal['assets_mode_master'];
|
||||
$storeValue['name_of_the_owner'] = $assest_owners_name;
|
||||
$storeValue['purchase_year'] = $fetchVal['vintage_personal'] . ' Yrs';
|
||||
$storeValue['purchase_year'] .= isset($fetchVal['asset_months']) ? (' & '.$fetchVal['asset_months'] . ' Mns'): '';
|
||||
$storeValue['purchase_year'] = isset($fetchVal['vintage_personal']) && $fetchVal['vintage_personal'] != "" && $fetchVal['vintage_personal'] != 0 ? $fetchVal['vintage_personal']. ' Yrs' : '';
|
||||
$storeValue['purchase_year'] .= isset($fetchVal['asset_months']) && $fetchVal['asset_months'] != "" && $fetchVal['asset_months'] != 0 ? ($fetchVal['vintage_personal'] != "" && $fetchVal['vintage_personal'] != 0 ? ' & '.$fetchVal['asset_months'] . ' Mns' : $fetchVal['asset_months'] . ' Mns' ): '';
|
||||
|
||||
$storeValue['emi'] = (!strcasecmp($fetchVal['emi'],'yes'));
|
||||
// this is for investments type
|
||||
if($fetchVal['assets_mode']==7){
|
||||
@ -142,11 +144,13 @@ public static function getOthersAssetsDetails($values){
|
||||
}
|
||||
|
||||
// business asset details
|
||||
public static function getBusinessAssetsDetails($business_assets){
|
||||
public static function getBusinessAssetsDetails($business_assets,$pdid){
|
||||
|
||||
$total_tables = count($business_assets) / 5;
|
||||
$total_tables = ceil($total_tables);
|
||||
$overall_data = array();
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
|
||||
//$i = 10;
|
||||
// $header_row_.$i = '<tr><th>Particulars</th>';
|
||||
// echo $header_row_.$i;
|
||||
@ -184,11 +188,15 @@ public static function getOthersAssetsDetails($values){
|
||||
{
|
||||
foreach($fetchVal['business_name_of_the_owner'] as $owner)
|
||||
{
|
||||
$owners_list.= ($owner['id'] != 0 ? $owner['name'].', ' : $fetchVal['business_name_of_the_other_owner'].', ');
|
||||
$owners_list .= ($owner['id'] != 0 ? ( $owner['group_id'] == 1 ? $owner['name'].', ' : (APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$latest_applicants_names).' , ')) : $fetchVal['business_name_of_the_other_owner'].', ');
|
||||
}
|
||||
}
|
||||
//print_r($owners_list);
|
||||
//print_r($owners_list);die();
|
||||
$owners_list = substr_replace($owners_list, '', strrpos($owners_list, ','),1);
|
||||
if(strrpos($owners_list, ','))
|
||||
{
|
||||
$owners_list = substr_replace($owners_list, 'and', strrpos($owners_list, ','),1);
|
||||
}
|
||||
|
||||
$owners_list = $owners_list != "" || $owners_list != null ? $owners_list : 'NA';
|
||||
$ownership_type = $fetchVal['business_ownership_type'];
|
||||
|
||||
@ -3,17 +3,19 @@
|
||||
class Bankingform
|
||||
{
|
||||
//get business Banking
|
||||
public static function getBusinessBankingDetails($values){
|
||||
public static function getBusinessBankingDetails($values,$pdid){
|
||||
// print_r($values);die();
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
|
||||
if(count($values)>0){
|
||||
$values = array_map(function($tag) {
|
||||
$values = array_map(function($tag) use ($latest_applicants_names){
|
||||
$count_vintage = $tag['vintage_year'] >0 ? $tag['vintage_year'] :"";
|
||||
$count_vintage .= ($tag['vintage_year'] == 1) ? " Year" : (($tag['vintage_year'] > 1) ? " Years" : "");
|
||||
$count_vintage.=' ';
|
||||
$count_vintage .=$tag['vintage_month'] >0 ? ($tag['vintage_year'] >0 ? ' and ' . $tag['vintage_month'] : $tag['vintage_month']) : "";
|
||||
$count_vintage .=($tag['vintage_month'] == 1) ? " Month" : (($tag['vintage_month'] > 1) ? " Months" : "");
|
||||
return array(
|
||||
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : $tag['applicant_name']['name'],
|
||||
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : ($tag['applicant_name']['group_id'] == 2 ? APPLICANTNAME_GRABBER::getApplicantsNameById($tag['applicant_name']['id'],$latest_applicants_names) : $tag['applicant_name']['name']),
|
||||
'bank_name' => $tag['bank_name'] ==1 ? $tag['other_bank'] : $tag['bank_name_master'],
|
||||
'account_type' => $tag['account_type_master'],
|
||||
'main_business' => $tag['is_main'],
|
||||
@ -26,16 +28,18 @@ public static function getBusinessBankingDetails($values){
|
||||
}
|
||||
|
||||
// get individual banking
|
||||
public static function getIndividualBankingDetails($values){
|
||||
public static function getIndividualBankingDetails($values,$pdid){
|
||||
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
if(count($values)>0){
|
||||
$values = array_map(function($tag) {
|
||||
$values = array_map(function($tag) use ($latest_applicants_names){
|
||||
$count_vintage = $tag['vintage_year'] >0 ? $tag['vintage_year'] :"";
|
||||
$count_vintage .= ($tag['vintage_year'] == 1) ? " Yr" : (($tag['vintage_year'] > 1) ? " Yrs" : "");
|
||||
$count_vintage.=' ';
|
||||
$count_vintage .=$tag['vintage_month'] >0 ? $tag['vintage_month'] : "";
|
||||
$count_vintage .=($tag['vintage_month'] == 1) ? " Month" : (($tag['vintage_month'] > 1) ? " Months" : "");
|
||||
return array(
|
||||
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : $tag['applicant_name']['name'],
|
||||
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : APPLICANTNAME_GRABBER::getApplicantsNameById($tag['applicant_name']['id'],$latest_applicants_names),
|
||||
'bank_name' => $tag['bank_name'] ==1 ? $tag['other_bank'] : $tag['bank_name_master'],
|
||||
'account_type' => $tag['account_type_master'],
|
||||
'main_business' => $tag['salary'],
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
class Businessform
|
||||
{
|
||||
//get partner details
|
||||
public static function getPartnerDetails($values){
|
||||
public static function getPartnerDetails($values,$pdid){
|
||||
$getPartner=array();
|
||||
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
foreach($values as $parRow){
|
||||
$getPartner = array_map(function($tag) {
|
||||
$getPartner = array_map(function($tag) use ($latest_applicants_names){
|
||||
$con_business_run = '';
|
||||
if($tag['current_business_experiance_year'] != '' && $tag['current_business_experiance_month'] != '')
|
||||
{
|
||||
@ -19,7 +21,7 @@ public static function getPartnerDetails($values){
|
||||
|
||||
|
||||
return array(
|
||||
'name' => array_key_exists('partner_other_name',$tag) ? $tag['partner_other_name'] : $tag['partner_name_master'],
|
||||
'name' => array_key_exists('partner_other_name',$tag) ? $tag['partner_other_name'] : (APPLICANTNAME_GRABBER::getApplicantsNameById($tag['partner_name'],$latest_applicants_names) ),
|
||||
'share_holding' => $tag['shareholding'].'%',
|
||||
'started_business' => $tag['started_business'] ? $tag['started_business'] : 'No',
|
||||
'no_years_business' => $con_business_run,
|
||||
@ -33,14 +35,15 @@ public static function getPartnerDetails($values){
|
||||
return $getPartner;
|
||||
}
|
||||
//get family members details
|
||||
public static function getFamilyMemberDetails($values){
|
||||
public static function getFamilyMemberDetails($values,$pdid){
|
||||
//print_r($values);die();
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
$getFamilyMembers=array();
|
||||
foreach($values as $parRow){
|
||||
if($parRow['family_member_name'] != "" || $parRow['family_member_name'] != null)
|
||||
{
|
||||
$company_relationship = strpos($parRow['relationship_with_company_id_master'], 'of') ? substr($parRow['relationship_with_company_id_master'],0,-2): $parRow['relationship_with_company_id_master'];
|
||||
$temp_family = array('name' => $parRow['family_member_salutation_master'].' '.$parRow['family_member_name'],'individual_relation' => $parRow['other_family_relationship_id_master'] .' of ','relation_to' => $parRow['relation_to_id_master'],'relation_to_company' => $company_relationship,'started_business' => $parRow['started_business']);
|
||||
$temp_family = array('name' => $parRow['family_member_salutation_master'].' '.$parRow['family_member_name'],'individual_relation' => $parRow['other_family_relationship_id_master'] .' of ','relation_to' => (APPLICANTNAME_GRABBER::getApplicantsNameById($parRow['relation_to_id'],$latest_applicants_names)),'relation_to_company' => $company_relationship,'started_business' => $parRow['started_business']);
|
||||
|
||||
array_push($getFamilyMembers,$temp_family);
|
||||
}
|
||||
|
||||
2147
api/application/helpers/data_dump_helper.php
Normal file
2147
api/application/helpers/data_dump_helper.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,9 @@
|
||||
class Financialform
|
||||
{
|
||||
//other loan obligations
|
||||
public static function getOtherLoanDetails($values){
|
||||
public static function getOtherLoanDetails($values,$pdid){
|
||||
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
$rupee_symbol = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px">₹</span>';
|
||||
$first_row = '<tr><td class="customtd">Loan Type</td>';
|
||||
$second_row = '<tr><td class="customtd">Loan Amount</td>';
|
||||
@ -58,11 +59,12 @@ public static function getOtherLoanDetails($values){
|
||||
}
|
||||
else
|
||||
{
|
||||
$name_of_borrower .= $l_value['name'] . ' , ';
|
||||
$name_of_borrower .= $l_value['group_id'] == 1 ? $l_value['name'] . ' , ': APPLICANTNAME_GRABBER::getApplicantsNameById($l_value['id'],$latest_applicants_names).' ,';
|
||||
}
|
||||
}
|
||||
$name_of_borrower = substr_replace($name_of_borrower,'',strrpos($name_of_borrower,','),1);
|
||||
if(strrpos($name_of_borrower,',')) { $name_of_borrower = substr_replace($name_of_borrower,' and ',strrpos($name_of_borrower,','),1); }
|
||||
$name_of_borrower = substr_replace($name_of_borrower, '', -1);
|
||||
// if(strrpos($name_of_borrower,',')) { $name_of_borrower = substr_replace($name_of_borrower,' and ',strrpos($name_of_borrower,','),1); }
|
||||
$name_of_borrower = str_replace(',','and', $name_of_borrower);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ class Neighbourreferencecheckform
|
||||
{
|
||||
public static function getNeighbourhoodDetails($company_name,$values,$pdMasterValue,$applicants_details){
|
||||
//print_r($applicants_details);die();
|
||||
// $latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdMasterValue['pd_id']);
|
||||
$applicantName=$pdMasterValue['main_applicant'];
|
||||
$values = array_map(function($tag) use ($applicantName,$company_name,$applicants_details) {
|
||||
$neighbourhood_name='Neighbour Check was done with ';
|
||||
@ -38,7 +39,7 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
|
||||
if($owner['id'] != 0)
|
||||
{
|
||||
$title = MYUTIL::applicantTitleName($applicants_details,$owner['id']);
|
||||
$ownwers_list .= $title.$owner['name'].' , ';
|
||||
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$applicants_details).' , ';
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
class Otherfamilyform
|
||||
{
|
||||
public static function getFamilyDetails($values){
|
||||
public static function getFamilyDetails($values,$pdid){
|
||||
$mergeResult=array();
|
||||
//print_r($values);die();
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
$male_gender_array = array('1','2','4','5','11','12','14','16','17','19','21','24');
|
||||
// $gender = 'DEFAULT';
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
@ -12,7 +12,7 @@ public static function getFamilyDetails($values){
|
||||
$storeValue=array();
|
||||
$storeValue['selected_person_title']= isset($fetchVal['selected_person_title_master']) ? $fetchVal['selected_person_title_master'] : '';
|
||||
|
||||
$storeValue['selected_person']= isset($fetchVal['selected_person_master']) ? $fetchVal['selected_person_master'] : $fetchVal['selected_person'];
|
||||
$storeValue['selected_person']= APPLICANTNAME_GRABBER::getApplicantsNameById($fetchVal['selected_person'],$latest_applicants_names);
|
||||
$storeValue['residency_address']=$fetchVal['residence_place'].', '.$fetchVal['residence_city_master'].', '.$fetchVal['residence_state_master'].'-';
|
||||
$storeValue['residency_address'] .=($fetchVal['residence_pin'] == 1) ? $fetchVal['residence_other_pincode'] : (($fetchVal['residence_pin'] > 1) ? $fetchVal['residence_pincode_master'] : "");
|
||||
//$storeValue['residency_address'] .='.';
|
||||
|
||||
@ -2,16 +2,38 @@
|
||||
|
||||
class Otherincomeform
|
||||
{
|
||||
public static function getIncomeDetails($values){
|
||||
$values = array_map(function($tag) {
|
||||
return array(
|
||||
'source' => $tag['source']==1 ? $tag['others_source'] : $tag['source_master'],
|
||||
'amount' => $tag['amount'],
|
||||
'frequency' => $tag['frequency']==1 ? $tag['others_frequency'] : $tag['frequency_master'],
|
||||
'earned_by' => $tag['income_earned_by'][0]['name']
|
||||
);
|
||||
}, $values);
|
||||
return $values;
|
||||
public static function getIncomeDetails($values,$pdid){
|
||||
$latest_applicants_names = APPLICANTNAME_GRABBER::getLatestApplicantsName($pdid);
|
||||
$result_array = array();
|
||||
foreach ($values as $key => $value)
|
||||
{
|
||||
$earned_by = "";
|
||||
foreach ($value['income_earned_by'] as $key1 => $applicant)
|
||||
{
|
||||
$earned_by .= $applicant['group_id'] == 1 ? $applicant['name'].' , ' : APPLICANTNAME_GRABBER::getApplicantsNameById($applicant['id'],$latest_applicants_names).' , ';
|
||||
}
|
||||
$earned_by = substr_replace($earned_by,'',-2);
|
||||
$earned_by = str_replace(',','and', $earned_by);
|
||||
|
||||
|
||||
|
||||
$t['source'] = $value['source']==1 ? $value['others_source'] : $value['source_master'];
|
||||
$t['amount'] = $value['amount'];
|
||||
$t['frequency'] = $value['frequency']==1 ? $value['others_frequency'] : $value['frequency_master'];
|
||||
$t['earned_by'] = $earned_by;
|
||||
array_push($result_array,$t);
|
||||
}
|
||||
// $values = array_map(function($tag) use ($latest_applicants_names){
|
||||
// return array(
|
||||
// 'source' => $tag['source']==1 ? $tag['others_source'] : $tag['source_master'],
|
||||
// 'amount' => $tag['amount'],
|
||||
// 'frequency' => $tag['frequency']==1 ? $tag['others_frequency'] : $tag['frequency_master'],
|
||||
// 'earned_by' => ( $tag['income_earned_by'][0]['name'])
|
||||
// );
|
||||
// }, $values);
|
||||
return $result_array;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
@ -333,7 +333,7 @@ class PDALERTS
|
||||
/*********************************************/
|
||||
/**Send SMS Notification to QC Team*****/
|
||||
/*********************************************/
|
||||
if($pd_notification_configs[0]['sms_qcteam'] == 1 && $is_app_notify_enabled)
|
||||
if($pd_notification_configs[0]['sms_qcteam'] == 1 && $is_sms_enabled)
|
||||
{
|
||||
$CI->db->DISTINCT();
|
||||
$CI->db->SELECT("mobile_no");
|
||||
|
||||
74
api/application/models/Data_Dump_Model.php
Normal file
74
api/application/models/Data_Dump_Model.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
require_once APPPATH . '/libraries/SPARQ_Model.php';
|
||||
class Data_Dump_Model extends SPARQ_Model {
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function saveGenDumpData($gen_data_dump)
|
||||
{
|
||||
if(isset($gen_data_dump['individuals_data']))
|
||||
{
|
||||
foreach ($gen_data_dump['individuals_data'] as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_GENERAL_IND);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($gen_data_dump['relationship_data']))
|
||||
{
|
||||
foreach ($gen_data_dump['relationship_data'] as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_GEN_RELATIONSHIP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveBusinessDUmpData($business_data_dump)
|
||||
{
|
||||
print_r($business_data_dump);
|
||||
echo "*****************";
|
||||
if(isset($business_data_dump['single_business_items']))
|
||||
{
|
||||
|
||||
$this->saveRecords($business_data_dump['single_business_items'],D_BUSINESS_FORM);
|
||||
|
||||
}
|
||||
if(isset($business_data_dump['partners_details']))
|
||||
{
|
||||
foreach ($business_data_dump['partners_details'] as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_BUSINESS_PARTNERS);
|
||||
}
|
||||
}
|
||||
if(isset($business_data_dump['type_of_activity_details']))
|
||||
{
|
||||
foreach ($business_data_dump['type_of_activity_details'] as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_BUSIENSS_TYPE);
|
||||
}
|
||||
}
|
||||
if(isset($business_data_dump['business_relatinship_data']))
|
||||
{
|
||||
foreach ($business_data_dump['business_relatinship_data'] as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_BUSINESS_RELATINSHIP);
|
||||
}
|
||||
}
|
||||
if(isset($business_data_dump['products']))
|
||||
{
|
||||
foreach ($business_data_dump['products'] as $index => $activity_data)
|
||||
{
|
||||
foreach ($activity_data as $key => $value)
|
||||
{
|
||||
$this->saveRecords($value,D_BUSINESS_PRODUCTS);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -371,7 +371,7 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
//print_r($addtional_pd_ids_string);die();
|
||||
|
||||
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode,PDAPPLICANTSDETAILS.relation,RELATIONSHIPS.name as relation_name,PDAPPLICANTSDETAILS.landline,PDAPPLICANTSDETAILS.company_name,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDAPPLICANTSDETAILS.additional_pd_id');
|
||||
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode,PDAPPLICANTSDETAILS.relation,RELATIONSHIPS.name as relation_name,PDAPPLICANTSDETAILS.landline,PDAPPLICANTSDETAILS.company_name,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDAPPLICANTSDETAILS.additional_pd_id,PDAPPLICANTSDETAILS.isactive');
|
||||
$this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
|
||||
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id','LEFT');
|
||||
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id','LEFT');
|
||||
@ -1875,6 +1875,7 @@ class PD_Model extends SPARQ_Model {
|
||||
{
|
||||
$fields = array('pd_id','pd_sno');
|
||||
$where_condition_array = array('lender_applicant_id' => $params['lender_applicant_id']);
|
||||
if($client) { $where_condition_array['fk_lender_id'] = $client; }
|
||||
return $this->selectCustomRecords($fields,$where_condition_array,$table);
|
||||
}
|
||||
else if($table == PDAPPLICANTSDETAILS)
|
||||
|
||||
@ -1341,7 +1341,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
// this is for person with relationship
|
||||
if(array_key_exists('persons_with_relationships',$businessRow)){
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships']);
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -1944,7 +1944,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
|
||||
$bindBusinessAsset["company_name"] .=' Business :';
|
||||
if(count($businessAssetRow['business_assets_details'])>0 && $is_business_asset_available ){
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
array_push($businessAssetResult,$bindBusinessAsset);
|
||||
|
||||
@ -2348,7 +2348,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(count($businessBankRow['banking_details'])>0){
|
||||
$getEachValues['is_od_cc'] = null;
|
||||
foreach($businessBankRow['banking_details'] as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $getEachValues['is_od_cc'] = true; } }
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getEachValues);
|
||||
|
||||
}
|
||||
@ -3178,7 +3178,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<p style="text-align:justify;">Stock not required to be maintained.</p>';
|
||||
}
|
||||
|
||||
$stock_photo_count = $pd_images[11];
|
||||
$stock_photo_count = array_filter($pd_images[11],function($d) use ($business_count){ if($d['company_id'] == ($business_count + 1)){ return 1;}else {return 0;} });
|
||||
$stock_img_row_count = ceil(count($stock_photo_count) / 3);
|
||||
if(count($stock_photo_count)){
|
||||
echo '<br>';
|
||||
@ -3637,7 +3637,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$is_personal_info_available = 1;
|
||||
|
||||
if(count($otherAssetRow['assets_details'])>0){
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],,$pd_master_details[0]['pd_id']);
|
||||
|
||||
//print_r($otherAssetResult);
|
||||
}
|
||||
@ -3697,7 +3697,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$is_personal_banking_available = 1;
|
||||
if(count($individualBankRow['banking_details'])>0){
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
|
||||
|
||||
}
|
||||
@ -3763,7 +3763,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
|
||||
$is_other_income_available = 1;
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
}
|
||||
@ -3815,7 +3815,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//print_r($familyRow);die();
|
||||
$other_family_form_common_remarks = $familyRow['family_details_form_remark'];
|
||||
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -3902,7 +3902,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && (!strcasecmp($is_all_loan_details_availble,'yes') && count($otherLoanRow['loan_details'])>0)){
|
||||
$is_existing_loans_available = 1;
|
||||
$total_no_of_data = count($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
else if(!strcasecmp($is_all_loan_details_availble,'no'))
|
||||
{
|
||||
|
||||
@ -196,7 +196,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
|
||||
/* #########Score Card2 Table Styles######### */
|
||||
|
||||
.scorecard_table2 {
|
||||
@ -1307,7 +1306,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//print_r($loan_table_dispaly_rows);
|
||||
?>
|
||||
<br><br>
|
||||
<table class="scorecard_table">
|
||||
<table class="scorecard_table_resonal_assest">
|
||||
<tr> <th style="text-align:center;">S.No</th> <th>Loan Particulars</th> <th>Loan Particular Details</th> </tr>
|
||||
<tbody>
|
||||
<?php
|
||||
@ -1360,7 +1359,7 @@ if($total_no_of_business > 0) {
|
||||
}
|
||||
// this is for person with relationship
|
||||
if(array_key_exists('persons_with_relationships',$businessRow)){
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships']);
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -1984,7 +1983,7 @@ if($total_no_of_business > 0) {
|
||||
$bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
|
||||
$bindBusinessAsset["company_name"] .=' Business :';
|
||||
if(count($businessAssetRow['business_assets_details'])>0 && $is_business_asset_available ){
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
array_push($businessAssetResult,$bindBusinessAsset);
|
||||
|
||||
@ -2389,7 +2388,7 @@ if($total_no_of_business > 0) {
|
||||
if(count($businessBankRow['banking_details'])>0){
|
||||
$getEachValues['is_od_cc'] = null;
|
||||
foreach($businessBankRow['banking_details'] as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $getEachValues['is_od_cc'] = true; } }
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getEachValues);
|
||||
|
||||
}
|
||||
@ -3215,7 +3214,9 @@ if($total_no_of_business > 0) {
|
||||
}
|
||||
//echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
|
||||
|
||||
$stock_photo_count = $pd_images[11];
|
||||
|
||||
$stock_photo_count = array_filter($pd_images[11],function($d) use ($business_count){ if($d['company_id'] == ($business_count + 1)){ return 1;}else {return 0;} });
|
||||
|
||||
$stock_img_row_count = ceil(count($stock_photo_count) / 3);
|
||||
if(count($stock_photo_count)){
|
||||
echo '<br>';
|
||||
@ -3714,13 +3715,14 @@ if($total_no_of_business > 0) {
|
||||
$is_personal_info_available = null;
|
||||
foreach($pd_processed_forms[4] as $rowKey=> $oaRow) {
|
||||
$otherAssetRow = json_decode($oaRow['processed_json'],true);
|
||||
//print_r($otherAssetRow);die();
|
||||
$other_assest_common_remrks = $otherAssetRow['assets_form_remark'];
|
||||
if(isset($otherAssetRow['asset_info_available']) && $otherAssetRow['asset_info_available'] == 1)
|
||||
{
|
||||
$is_personal_info_available = 1;
|
||||
|
||||
if(count($otherAssetRow['assets_details'])>0){
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
//print_r($otherAssetResult);
|
||||
}
|
||||
@ -3780,7 +3782,7 @@ if($total_no_of_business > 0) {
|
||||
{
|
||||
$is_personal_banking_available = 1;
|
||||
if(count($individualBankRow['banking_details'])>0){
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
|
||||
|
||||
}
|
||||
@ -3842,11 +3844,11 @@ if($total_no_of_business > 0) {
|
||||
foreach($pd_processed_forms[9] as $rowKey=> $iRow) {
|
||||
$otherIcomeRow = json_decode($iRow['processed_json'],true);
|
||||
$other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks'];
|
||||
|
||||
//print_r($otherIcomeRow);die();
|
||||
|
||||
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
|
||||
$is_other_income_available = 1;
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
}
|
||||
@ -3854,7 +3856,7 @@ if($total_no_of_business > 0) {
|
||||
<br>
|
||||
<h3 contenteditable="true">Other Sources of Income of Individual Loan Applicants:</h3>
|
||||
<?php if($is_other_income_available != null){
|
||||
//print_r($otherIncomeResult);
|
||||
//print_r($otherIncomeResult);die();
|
||||
?>
|
||||
|
||||
|
||||
@ -3898,7 +3900,7 @@ if($total_no_of_business > 0) {
|
||||
//print_r($familyRow);die();
|
||||
$other_family_form_common_remarks = $familyRow['family_details_form_remark'];
|
||||
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -3972,7 +3974,7 @@ if($total_no_of_business > 0) {
|
||||
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
|
||||
$is_existing_loans_available = 1;
|
||||
$total_no_of_data = count($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1308,7 +1308,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//print_r($loan_table_dispaly_rows);
|
||||
?>
|
||||
<br><br>
|
||||
<table class="scorecard_table">
|
||||
<table class="scorecard_table_resonal_assest">
|
||||
<tr> <th style="text-align:center;">S.No</th> <th>Loan Particulars</th> <th>Loan Particular Details</th> </tr>
|
||||
<tbody>
|
||||
<?php
|
||||
@ -1358,7 +1358,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
// this is for person with relationship
|
||||
if(array_key_exists('persons_with_relationships',$businessRow)){
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships']);
|
||||
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships'],,$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -1973,7 +1973,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
|
||||
$bindBusinessAsset["company_name"] .=' Business :';
|
||||
if(count($businessAssetRow['business_assets_details'])>0 && $is_business_asset_available ){
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
|
||||
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
array_push($businessAssetResult,$bindBusinessAsset);
|
||||
|
||||
@ -2377,7 +2377,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(count($businessBankRow['banking_details'])>0){
|
||||
$getEachValues['is_od_cc'] = null;
|
||||
foreach($businessBankRow['banking_details'] as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $getEachValues['is_od_cc'] = true; } }
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
|
||||
$getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getEachValues);
|
||||
|
||||
}
|
||||
@ -3203,7 +3203,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
//echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
|
||||
|
||||
$stock_photo_count = $pd_images[11];
|
||||
$stock_photo_count = array_filter($pd_images[11],function($d) use ($business_count){ if($d['company_id'] == ($business_count + 1)){ return 1;}else {return 0;} });
|
||||
$stock_img_row_count = ceil(count($stock_photo_count) / 3);
|
||||
if(count($stock_photo_count)){
|
||||
echo '<br>';
|
||||
@ -3696,7 +3696,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$is_personal_info_available = 1;
|
||||
|
||||
if(count($otherAssetRow['assets_details'])>0){
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
//print_r($otherAssetResult);
|
||||
}
|
||||
@ -3756,7 +3756,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$is_personal_banking_available = 1;
|
||||
if(count($individualBankRow['banking_details'])>0){
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
|
||||
|
||||
}
|
||||
@ -3822,7 +3822,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
|
||||
$is_other_income_available = 1;
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'],,$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
}
|
||||
@ -3874,7 +3874,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//print_r($familyRow);die();
|
||||
$other_family_form_common_remarks = $familyRow['family_details_form_remark'];
|
||||
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -3948,7 +3948,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
|
||||
$is_existing_loans_available = 1;
|
||||
$total_no_of_data = count($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$is_personal_info_available = 1;
|
||||
|
||||
if(count($otherAssetRow['assets_details'])>0){
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
|
||||
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
//print_r($otherAssetResult);
|
||||
}
|
||||
@ -1261,7 +1261,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$is_personal_banking_available = 1;
|
||||
if(count($individualBankRow['banking_details'])>0){
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
|
||||
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']);
|
||||
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
|
||||
|
||||
}
|
||||
@ -1327,7 +1327,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
|
||||
$is_other_income_available = 1;
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
|
||||
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'],$pd_master_details[0]['pd_id']);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1379,7 +1379,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//print_r($familyRow);die();
|
||||
$other_family_form_common_remarks = $familyRow['family_details_form_remark'];
|
||||
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
|
||||
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -1453,7 +1453,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
|
||||
$is_existing_loans_available = 1;
|
||||
$total_no_of_data = count($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
|
||||
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'],$pd_master_details[0]['pd_id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user