From 61ff82bb25724e8664a8e1590ecf09327fa161ec Mon Sep 17 00:00:00 2001
From: dineshkumarkannan '.$business_form_common_remarks.' '.$business_assets_form_remark.'Asset '.($bsk+1).' ';
$first_row .= ''.$fetchVal['business_assets_mode_master'].' ';
- $sec_row .= ''.($fetchVal['business_details'][0]['equipment_manufacturing_description']).' ';
- $third_row .= ''. $ownership_type .' ';
+ $sec_row .= ''.($fetchVal['business_details'][0]['equipment_manufacturing_description']).' purchased at '.$fetchVal['business_purchase_year'] .' ';
+ $third_row .= ''. ucfirst($ownership_type) .' ';
$fourth_row .= ''.$owners_list.' ';
$fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').' ';
$sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').' ';
$seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').' ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' ';
}
// this is for vehicle
else if($fetchVal['business_assets_mode']==3){
$header_row .= 'Asset '.($bsk+1).' ';
$first_row .= ''.$fetchVal['business_assets_mode_master'].' ';
- $sec_row .= ''.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).' ';
- $third_row .= ''. $ownership_type .' ';
+ $sec_row .= ''.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).' purchased at '.$fetchVal['business_purchase_year'].' ';
+ $third_row .= ''. ucfirst($ownership_type) .' ';
$fourth_row .= ''.$owners_list.' ';
$fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').' ';
$sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').' ';
$seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').' ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' ';
}
// this property
@@ -198,24 +198,24 @@ public static function getOthersAssetsDetails($values){
$header_row .= 'Asset '.($bsk+1).' ';
$first_row .= ''.$fetchVal['business_assets_mode_master'].' at '. $fetchVal['business_details'][0]['address_of_the_property'].' ';
$sec_row .= ''.($fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master']).' ';
- $third_row .= ''. $ownership_type .' ';
+ $third_row .= ''. ucfirst($ownership_type) .' ';
$fourth_row .= ''.$owners_list.' ';
$fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').' ';
$sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').' ';
$seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').' ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' ';
}
//this is for other
else if($fetchVal['business_assets_mode']==1){
$header_row .= 'Asset '.($bsk+1).' ';
$first_row .= ''.$fetchVal['business_assets_mode_master'].' ';
$sec_row .= ''.$fetchVal['business_details'][0]['any_other_assets'].' ';
- $third_row .= ''. $ownership_type .' ';
+ $third_row .= ''. ucfirst($ownership_type) .' ';
$fourth_row .= ''.$owners_list.' ';
$fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').' ';
$sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').' ';
$seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? strtoupper($fetchVal['business_emi']) : 'NA').' ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' ';
}
}
diff --git a/api/application/helpers/otherfamilyform_helper.php b/api/application/helpers/otherfamilyform_helper.php
index 1ecd789d..5f056c02 100644
--- a/api/application/helpers/otherfamilyform_helper.php
+++ b/api/application/helpers/otherfamilyform_helper.php
@@ -5,9 +5,10 @@ class Otherfamilyform
public static function getFamilyDetails($values){
$mergeResult=array();
+ $male_gender_array = array('1','2','4','5','11','12','14','16','17','19','21','24');
+ // $gender = 'DEFAULT';
$rupee_symbol = "₹";
foreach($values as $fetchVal){
- //print_r($fetchVal);die();
$storeValue=array();
$storeValue['selected_person_title']= isset($fetchVal['selected_person_title_master']) ? $fetchVal['selected_person_title_master'] : '';
@@ -19,20 +20,25 @@ public static function getFamilyDetails($values){
$storeValue['residence_ownership']=($fetchVal['residence_ownership'] == 1) ? $fetchVal['ownershipOther'] :(($fetchVal['residence_ownership'] == 3) ? $fetchVal['residence_ownership_master'] : $fetchVal['residence_ownership_master']);
$storeValue['rent'] = $fetchVal['rent'];
$storeValue['no_family_members']= count($fetchVal['family_members_details']) > 0 ? count($fetchVal['family_members_details']) : '0';
- $storeValue['family_members_details'] = array_map(function($tag) {
+ $storeValue['family_members_details'] = array_map(function($tag) use ($male_gender_array){
+
+ $gender = array_search($tag['family_member_relationship'],$male_gender_array);
+ $gender = $gender ? 'He' :'She';
$getFamilyEarning='';
if($tag['family_member_earning_status']==1){
$getFamilyEarning= 'Earning ';
$getFamilyOccupation = $tag['earning_segment']==1 ? $tag['earning_if_others_segment'].' Income of '.$tag['earning_gross_income_per_month'].' per month. ':' Income of '.'₹'.' '.MYUTIL::customIndianNumberFormat($tag['earning_gross_income_per_month']).' per month ';
$getFamilyOccupation .= $tag['earning_name_of_the_employer_or_business'] ? ' received from '.$tag['earning_name_of_the_employer_or_business'].'. ' : '';
- $getFamilyOccupation .= 'He has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' years.';
+ $getFamilyOccupation .= $gender.' has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' years.';
// ? .' years earning Rs.'. : $tag['earning_segment_master'].' with '.$tag['earning_name_of_the_employer_or_business'].' since '.$tag['earning_number_of_years_in_employment_or_business'].' years earning Rs.'.$tag['earning_gross_income_per_month'].' per month ';
}
else if($tag['family_member_earning_status']==2){
$getFamilyEarning = 'Non-Earning';
$getFamilyOccupation = $tag['non_earning_occupation'] != 1 ? $tag['non_earning_occupation_master'] : $tag['non_earning_if_others'];
+ $getFamilyOccupation .= $tag['non_earning_if_schoolorcollege'] != "" ? ' at '.$tag['non_earning_if_schoolorcollege'] : ($tag['non_earning_if_retired_from'] != "" ? ' from '.$tag['non_earning_if_retired_from']: '');
+
}
return array(
'name' => $tag['family_member_name'],
diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php
index 3b642174..fe849cc9 100644
--- a/api/application/views/report_templates/JSONTOREPORT.php
+++ b/api/application/views/report_templates/JSONTOREPORT.php
@@ -954,7 +954,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for','details' => "₹"." ".MYUTIL::customIndianNumberFormat($loan_form['topup_amount']).' ('.MYUTIL::numtowords($loan_form['topup_amount']).')');
- $loan_table_dispaly_rows[] = array('particulars' => 'End Use of Topup','details' => ($loan_form['end_use_topup_master']));
+ $loan_table_dispaly_rows[] = array('particulars' => 'End Use of Topup','details' => ( strcasecmp('others',$loan_form['end_use_topup_master'])) ? $loan_form['end_use_topup_master'] : $loan_form['other_end_use_topup'] );
$loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender_master']);
@@ -1024,7 +1024,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
$bRow = $pd_processed_forms[13][$business_count];
$businessRow = json_decode($bRow['processed_json'],true);
- //print_r($businessRow);
+ //print_r($businessRow);die();
+ $business_form_common_remarks = $businessRow['business_remarks'];
$companyList = MYUTIL::findCompanyName($all_company_details,$businessRow['company_id'],2);
//$companyList .=' The director details are as under :';
$bindEachResult["company_details"]=$companyList;
@@ -1105,7 +1106,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['company_employees'] = '';
- // this is for no of employess details
+ // this is for no of employees details
if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) {
$bindEachResult['company_empployees']='As per person met there are no permanent';
}
@@ -1119,12 +1120,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
else{
- $bindEachResult['company_employees'].= ' and no temporary employess with company';
+ $bindEachResult['company_employees'].= ' and no temporary employees with company.';
}
- if(($businessRow['employees_permanent'] != "" || $businessRow['employees_permanent'] == 0) && ($businessRow['employees_temporary'] != "" || $businessRow['employees_temporary'] == 0))
+ if(($businessRow['employees_permanent'] != "" && $businessRow['employees_permanent'] == 0) && ($businessRow['employees_temporary'] != "" && $businessRow['employees_temporary'] == 0))
{
- $bindEachResult['company_employees'].= ' There are no permanant and temporary employess with company.';
+ $bindEachResult['company_employees'].= 'There are no permanant and temporary employees with company.';
}
@@ -1580,9 +1581,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+ }
+
+ if($business_form_common_remarks != "")
+ {
+ echo '
Financials statements not providing by Loan Applicants to PD officer.
";} ?> @@ -1898,7 +1913,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); The Loan Applicants have not availed any Working Capital Facilities from any financial institution";} ?> - '. $financial_remarks.'
'; } + } else {?>Financial information is not available.
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; } } @@ -1966,6 +1985,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); '.$business_banking_common_remarks.''; } + }// end of busienss bankDetails available in this currrent index ?> @@ -1997,20 +2018,20 @@ defined('BASEPATH') OR exit('No direct script access allowed'); { $cRow = $pd_processed_forms[2][$business_count]; $clientRow = json_decode($cRow['processed_json'],true); - $client_form_remarks = $clientRow['supplier_info_form_remark']; + $client_form_remarks = isset($clientRow['supplier_info_form_remark']) ? $clientRow['supplier_info_form_remark'] : ''; $name_of_the_company = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1); // $bindEachResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1); // $getmanufacturing = array(); // $getTrading=array(); // $getService=array(); //$getTotalPaymentsPercentonCredit=array(); - $client_first_row = 'Personal asset is not available.
- + '.$other_assest_common_remrks.''; } + + ?> $ibRow) { $individualBankRow = json_decode($ibRow['processed_json'],true); //print_r($individualBankRow); + $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; if(count($individualBankRow['banking_details'])>0){ $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']); $bankingResult = array_merge($bankingResult,$getIndividualEachValues); @@ -3041,7 +3068,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + '.$ind_banking_common_remarks.''; } + } ?> @@ -3056,7 +3086,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); foreach($pd_processed_forms[9] as $rowKey=> $iRow) { $otherIcomeRow = json_decode($iRow['processed_json'],true); // print_r($otherIcomeRow); - // echo "@@@@@@@@@@@@@@@@@@@@@"; + $other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks']; if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){ $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']); } @@ -3093,7 +3123,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');As per the loan applicants met by PD officer, they do not have any other source of Income.
- + '. $other_source_income_common_remarks.''; } + + ?> @@ -3102,7 +3135,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $familyResult=array(); foreach($pd_processed_forms[6] as $rowKey=> $fRow) { $familyRow = json_decode($fRow['processed_json'],true); - // print_r($familyRow); + //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']); } @@ -3120,7 +3154,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $intro_text = ''.$fmValue['selected_person_title'].$fmValue['selected_person'].'Family Information - Select person for capturing family details, who is an applicant in the case, resides at '.$fmValue['residency_address'].'Family Information - Residence Address of Select person .'; $residence_text ='This is a '. $fmValue['residence_ownership'].' Family Information - Ownership of Residence residence, where the applicant has been staying for '. $fmValue['residence_No_of_years'].'Family Information - No of Yrs in current residence .'; - $residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? 'The rent paid Rs.'.$fmValue['rent'].'per month.' : ''; + $residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? ' The rent paid Rs.'.$fmValue['rent'].' per month.' : ''; echo $intro_text;echo "Other Family Members is not available.
- + '.$other_family_form_common_remarks.''; } + + ?> @@ -3169,6 +3206,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); foreach($pd_processed_forms[8] as $rowKey=> $elRow) { $otherLoanRow = json_decode($elRow['processed_json'],true); //print_r($otherLoanRow); + $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; $total_no_of_data = 0; if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){ $total_no_of_data = count($otherLoanRow['loan_details']); @@ -3212,8 +3250,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // } else {?> -As per loan applicant he doesn’t have any existing obligations
+As per loan applicant he does not have any existing loan obligations
+ '.$existing_loan_form_common_remarks.'';} + ?> @@ -3230,7 +3271,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $neighbourRefRow = json_decode($nrcRow['processed_json'],true); //print_r($applicants_details); //print_r($neighbourRefRow); - // + $neighbourhood_form_common_remarks = $neighbourRefRow['neighbour_reference_remark']; if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){ $pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status']; if(count($neighbourRefRow['neighbourhood_list'])>0){ @@ -3261,10 +3302,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');