done report : ps

This commit is contained in:
sanjeev 2021-12-11 21:33:35 +05:30
parent 7159ef15f3
commit e95870b92e
4 changed files with 29 additions and 18 deletions

View File

@ -1642,7 +1642,10 @@ public function assignPDTempalate($data)
if($smc_lender_id == $lender_id[0]['fk_lender_id'] && isset($records['pd_agency_id']) && $records['pd_agency_id'] != null){
$records['vendor_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ; //Here vendor_status is dynamic (ALLOCATED,SCHEDULED,COMPLETED like that)
//Mail - SMC Vendor.
if($records['vendor_status'] == ALLOCATED){PDALERTS::sendMWcreditPDMail($this,$records['pd_id']);}
if($records['vendor_status'] == ALLOCATED){
PDALERTS::sendMWcreditPDMail($this,$records['pd_id']);
$records['pd_status'] = ALLOCATED_TO_FIA;
}
}
}
else{

View File

@ -9,15 +9,16 @@ class applicantname_grabber
$CI->load->model('PD_Model');
//return ( $CI->PD_Model->selectCustomRecords(array('pd_co_applicant_id','applicant_name'),array('fk_pd_id' => $pd_id),PDAPPLICANTSDETAILS));
$columns = array('pd_co_applicant_id','applicant_name','TITLES.name as title');
$columns = array('PDAPPLICANTSDETAILS.pd_co_applicant_id','PDAPPLICANTSDETAILS.applicant_name','TITLES.name as title');
$table = array(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
$joins = array(
array('table' => TITLES. ' as TITLES',
'condition' =>"PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id AND PDAPPLICANTSDETAILS.fk_pd_id = $pd_id",
'jointype' => 'LEFT')
);
$where_condition_array = array('PDAPPLICANTSDETAILS.fk_pd_id'=>$pd_id);
return ( $CI->PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array));
return ( $CI->PD_Model->getJoinRecords($columns,$table,$joins));
}
public static function getApplicantsNameById($id,$latest_applicants_names,$type = 1) //$type i for return name only, 2 for return title only, and 3 for return both

View File

@ -62,10 +62,10 @@ public static function getNewBuinessBankingDetails($values,$pdid){
$count_vintage .=$tag['vintage_month_business'] >0 ? $tag['vintage_month_business'] : "";
$count_vintage .=($tag['vintage_month_business'] == 1) ? " Month" : (($tag['vintage_month_business'] > 1) ? " Months" : "");
return array(
'account_name' => $tag['applicant_name_business']['id']==0 ? $tag['other_applicant_business'] : APPLICANTNAME_GRABBER::getApplicantsNameById($tag['applicant_name_business']['id'],$latest_applicants_names),
'account_name' => $tag['applicant_name_business']['id']==0 ? $tag['other_applicant_business'] : ($tag['applicant_name']['group_id'] == 2 ? APPLICANTNAME_GRABBER::getApplicantsNameById($tag['applicant_name']['id'],$latest_applicants_names) : $tag['applicant_name_business']['name']),
'bank_name' => $tag['bank_name_business'] ==1 ? $tag['other_bank_business'] : $tag['bank_name_business_master'],
'account_type' => $tag['account_type_business_master'],
'main_business' => $tag['salary_business'],
'main_business' => $tag['is_main'],
'od_cc_limit' => ($tag['account_type_business']==3) ? $tag['limit_business'] : (($tag['account_type_business']==4) ? $tag['limit_business'] : ''),
'vintage' => $count_vintage,
'same_ac_used_for' => "Business",

View File

@ -2669,15 +2669,22 @@ if($total_no_of_business > 0) {
}
foreach($newBankingResult as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $is_od_cc = true; } }
if(count($newBankingResult)>0){
$newBankingResult = array_filter($newBankingResult, function ($var) {
// return ($var['same_ac_used_for'] == "Business");
return (($var['account_name'] == $fetchRow['company_details']['company_name']) && ($var['same_ac_used_for'] == "Business"));
});
// $newBankingResult = array_filter($newBankingResult, function ($var) {
// // return ($var['same_ac_used_for'] == "Business");
// return (($var['account_name'] == $fetchRow['company_details']['company_name']) && ($var['same_ac_used_for'] == "Business"));
// });
$filteredBankingResult = array();$b=0;
for($a = 0; $a <= count($newBankingResult); $a++){
if($newBankingResult[$a]['account_name'] == $fetchRow['company_details']['company_name'] && $newBankingResult[$a]['same_ac_used_for'] == "Business"){
$filteredBankingResult[$b] = $newBankingResult[$a];
$b++;
}
}
}//forloop ends here.
?>
<?php
echo '<h3 contenteditable="true">Business Banking:</h3>';
if(count($newBankingResult)>0){ ?>
if(count($filteredBankingResult)>0){ ?>
<table class="scorecard_table">
<thead>
<tr>
@ -2691,7 +2698,7 @@ if($total_no_of_business > 0) {
</tr>
</thead>
<tbody>
<?php foreach($newBankingResult as $bdRow){
<?php foreach($filteredBankingResult as $bdRow){
if($bdRow['account_name'] != '')
{
@ -4081,13 +4088,13 @@ if($total_no_of_business > 0) {
foreach($pd_processed_forms[7] as $rowKey=> $ibRow) {
$individualBankRow = json_decode($ibRow['processed_json'],true);
$ind_banking_common_remarks = $individualBankRow['banking_form_remark'];
if(isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1){
$is_personal_banking_available = 1;
if(count($individualBankRow['business_details'])>0){
$getBuinessEachValues=BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'],$pd_master_details[0]['pd_id']);
$bankingResult = array_merge($bankingResult,$getBuinessEachValues);
}
}
// if(isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1){
// $is_personal_banking_available = 1;
// if(count($individualBankRow['business_details'])>0){
// $getBuinessEachValues=BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'],$pd_master_details[0]['pd_id']);
// $bankingResult = array_merge($bankingResult,$getBuinessEachValues);
// }
// }
if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1)
{
$is_personal_banking_available = 1;