diff --git a/api/application/helpers/smc_creditpd_helper.php b/api/application/helpers/smc_creditpd_helper.php index de276e21..e4c4bad4 100644 --- a/api/application/helpers/smc_creditpd_helper.php +++ b/api/application/helpers/smc_creditpd_helper.php @@ -66,18 +66,31 @@ class smc_creditpd static function getBorrowerSectionData($section) { $json = json_decode($section['json'],true); + $person_met = ''; foreach ($json['borrower_details'] as $key => $value) { + if(isset($value['borrower_met']) && !strcasecmp($value['borrower_met'],'yes')) { - $json['person_met'] = $value['borrower_name']; - break; + $person_met .= $value['borrower_name'].', '; } } // if(!isset($json['person_met'])) // { // $json['person_met'] = ''; // } + if($person_met != '') + { + $person_met = substr_replace($person_met,'',-2); + + if(substr_count($person_met,',')) + { + $person_met = substr_replace($person_met,' and ',strpos($person_met,','),2); + } + + } + + $json['person_met'] = $person_met; return $json; } diff --git a/api/application/helpers/smcpdscore_helper.php b/api/application/helpers/smcpdscore_helper.php index f7e72898..ff5b8bed 100644 --- a/api/application/helpers/smcpdscore_helper.php +++ b/api/application/helpers/smcpdscore_helper.php @@ -56,7 +56,7 @@ class SMCPDSCORE $stock_raw_material_enough = array('Provided' => 10, 'Not Provided' => 0,'Not Applicable' => 0); $stock_finished_goods_enough = array('Provided' => 10, 'Not Provided' => 0,'Not Applicable' => 0); $stock_answer_scores = array('yes' => 10, 'no' => 0,'not applicable' => 0); - $location_suited_for_busienss = array('Well Suited' => 10 ,'Fairly Suited' => 6,'Not Suited' => 0); + $location_suited_for_busienss = array('Well Suited' => 10 ,'Fairly suited' => 6,'Not suited' => 0); $business_activity_has_seen = array('Yes' => 10, 'No' => 0); /*-------- FINAL --------------*/ diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php index 02aaedf9..63bc6318 100644 --- a/api/application/views/smc_creditpd_reports/MWISE.php +++ b/api/application/views/smc_creditpd_reports/MWISE.php @@ -200,7 +200,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Personal Discussion Sheet - Business Loans + Personal Discussion Sheet - Application ID @@ -225,7 +225,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); --> - + @@ -243,26 +243,52 @@ defined('BASEPATH') OR exit('No direct script access allowed'); { echo ' Actual PD Address '.$pd_section_data[2]['alternative_address'].''; } - echo ' Address Type '.$pd_section_data[2]['address_type']['address_type'].''; + + $ownership_type = ''; + if( !strtolower($pd_section_data[8]['business_ownership_type']) == 'owned') + { + $ownership_type = '( Owned )'; + } + else + { + $ownership_type = '( Rented ) - '.$pd_section_data[8]['business_monthly_rented_amt']; + } + echo ' Address Type / Ownership '.$pd_section_data[2]['address_type']['address_type'].$ownership_type.''; echo ' PD locality '.$pd_section_data[2]['pd_locality']['locality_name'].''; echo ' Location Approach '.$pd_section_data[2]['pd_location']['description'].''; echo ' Comment On Locality '.$pd_section_data[2]['comment_locality']['rating'].''; + echo ' Estimated Area of Business Premise '.$pd_section_data[2]['business_estimated_area'].' '.$pd_section_data[2]['uom'].''; } ?> + + + Business operating duration
from this address + + -
+ + +

+
Satellite Image of PD Location

+

GPS Coordinates of location where PD Visit was done :

+ + PD Visted Location Satellite Image + Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown

';} + ?> +
- + - + $value1) { - echo ''; + echo ''; } ?> @@ -302,7 +328,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + // echo '
'; echo '
Applicant`s DetailsBorrower`s Details
Borrower
Type
NameEntity TypeDesignationRelationRealtion toAgeNo of Year(s)
Business runing
Borrower
Type
NameEntity TypeDesignationRelationRealtion toAgeBorrower's vintage in
the business(Yrs)
'.$value1['borrower_type'].' '.$value1['borrower_name'].' '.$value1['entity_type'].' '.$value1['designation'].' '.$value1['relationship'].' '.$value1['relationship_to'].' '.(isset($value1['borrower_age']) && !empty($value1['borrower_age']) ? $value1['borrower_age'] : 'NA').' '.(isset($value1['numbers_of_years_business_running']) && !empty($value1['numbers_of_years_business_running']) ? $value1['numbers_of_years_business_running'] : 'NA').'
'.$value1['borrower_type'].' '.$value1['borrower_name'].' '.$value1['entity_type'].' '.$value1['designation'].' '.$value1['relationship'].' '.$value1['relationship_to'].' '.(isset($value1['borrower_age']) && !empty($value1['borrower_age']) ? $value1['borrower_age'] : 'NA').' '.(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').'
'; echo ''; @@ -362,10 +388,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } echo ''; echo '
Business Related Parameters Impacting Score Response
'; - echo '
'; + // echo '
'; }?> -
+
@@ -387,6 +413,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); + + + + @@ -440,7 +470,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Loan tenure
End use of Loan
Is There any Balance Transfer
-
+

@@ -448,11 +478,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + - + $section5_value) { - echo ''. + echo ''. ''. ''. ''. - ''. + ''. ''. ''; } @@ -475,7 +505,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?>
Details of Key Stakeholders in the Business
NameName Share Holding Year(s) in Current Business Total Work Exp(Yrs)Previous Experience DetailsPrevious Experience Details Started Business
'.$section5_value['stakeholder_name'] .'
'.$section5_value['stakeholder_name'] .''.$section5_value['share_holding'].'%'.$section5_value['vintage_in_current_biz'].''.$section5_value['total_work_exp'].''.( isset ($section5_value['previous_experience_details']) && $section5_value['previous_experience_details'] ? $section5_value['previous_experience_details'] : 'NA' ).''.( isset ($section5_value['previous_experience_details']) && $section5_value['previous_experience_details'] ? $section5_value['previous_experience_details'] : 'NA' ).''.$section5_value['started_biz'].'
-
+ +
@@ -508,6 +539,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } } + else + { + echo ''; + } if(isset($pd_section_data[16]['common_remarks']) && !empty($pd_section_data[16]['common_remarks'])) { echo ''; @@ -516,7 +551,27 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?>
No other family member is involved in the business
Remarks'.$pd_section_data[16]['common_remarks'] .'
-
+ + + + + + + + + + + + + + + + + + +
General Business Information
Business Entity Type
Business Activity
Area of Sale
+ +
@@ -525,7 +580,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - +
Product/Service Name Contribution Business ProductremarksRemarks
+
';?> + echo '';?>
Business Brief
'.$pd_section_data[6]['business_process'] .'
Business Brief
'.$pd_section_data[6]['business_process'] .'
- + + +
+ + + + + +
Activity Observed during Visit (Yes / No)
+
@@ -594,28 +662,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); + + + +
Temporary >>
Remark +
- - - - - - - - - - - - - - - - - - -
General Business Information
Business Entity Type
Business Activity
Area of Sale
- +
@@ -639,13 +693,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
- + + - + + --> +> + + +
-
-
- - -
Other Business Assets
- - - + + + + + + - + + - - - - - - - + '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'); + foreach ($pd_section_data[8]['business_assets_details'] as $asset_key => $b_asset) + { + + $description = $b_asset['other_asset_description']; + if(isset($b_asset['property_type'])) + { + + if($b_asset['property_type'] == 1){ $description .= '('. $b_asset['property_type_others'] .')'; } + else{ $description .= '('. $address_type[ $b_asset['property_type'] ] .')'; } + } + if(isset($b_asset['vehicle_type'])) + { + + + if($b_asset['vehicle_type'] == 1){ $description .= '('. $b_asset['vehicle_type_others'] .')'; } + else{$description .= '('. $vehicle_type[ $b_asset['vehicle_type'] ] .')';} + } + if(isset($b_asset['business_purchase_year'])) + { + $description .= ' purchased at '.$b_asset['business_purchase_year']; + } + if(isset($b_asset['property_address'])) + { + $description .= ' is in '. $b_asset['property_address']; + } + $business_ownership_type = $b_asset['business_ownership_type'] . (isset($b_asset['business_monthly_rented_amt']) ? ' ( '. $rupee_symbol .' '. MYUTIL::customIndianNumberFormat($b_asset['business_monthly_rented_amt']) .' ) ' : ''); + $business_name_of_the_owner = (isset($b_asset['business_name_of_the_owner']) ? (applicantname_grabber::getMultipleApplicantsNameById($b_asset['business_name_of_the_owner'],$applicant_details)): 'NA'); + + + echo ''; + } + ?> + - +
Business Assets
Asset Type Asset Description Asset Ownership Owner's Name Market Value Age of the Asset (Yrs) Loan Agst Asset (Yes/ No)
'.( $b_asset['business_assets_mode'] == 1 ? $b_asset['other_asset_description'] : $asset_type [ $b_asset['business_assets_mode'] ]).' '. $description .' '. $business_ownership_type .' '. $business_name_of_the_owner .' '.(isset($b_asset['business_approximate_market_value']) ? ( $rupee_symbol .' '. MYUTIL::customIndianNumberFormat($b_asset['business_approximate_market_value'])) : 'NA').' '.(isset($b_asset['business_purchase_year']) ? $b_asset['business_purchase_year'] : 'NA').''.(isset($b_asset['business_emi']) ? $b_asset['business_emi'] : 'NA').'
@@ -922,14 +1019,24 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re
'?> - '?> + '?> + '; + } + + ?> + '?> + '?> + ';}?>
Debtor Days '.$pd_section_data[10]['debtor_days_cm'].'Creditor Days '.$pd_section_data[10]['creditor_days_cm'].' Stock Days '.$pd_section_data[10]['inventory_days_cm'].'
Does the business have any working capital facility from any lender other than Moneywise? (Yes / No) '.$pd_section_data[10]['is_any_other_working_captial_facility'].' If Yes, then details of the same to be captured '.(isset($pd_section_data[10]['facility_details_specify']) ? $pd_section_data[10]['facility_details_specify'] : '').'
('.(isset($pd_section_data[10]['facility_details_other']) ? $pd_section_data[10]['facility_details_other'] : $pd_section_data[10]['facility_details_other_lender']).')'.'
Does the business have any working capital facility from any lender other than Moneywise? (Yes / No) '.$pd_section_data[10]['is_any_other_working_captial_facility'].'
If Yes, then details of the same to be captured '.(isset($pd_section_data[10]['facility_details_specify']) ? $pd_section_data[10]['facility_details_specify'] : '').'
('.(isset($pd_section_data[10]['facility_details_other']) ? $pd_section_data[10]['facility_details_other'] : $pd_section_data[10]['facility_details_other_lender']).')'.'
Broken Period starting from '.$pd_section_data[10]['broken_period_from_month'].'Broken Period starting to '.$pd_section_data[10]['broken_period_to_month'].' No of Months '.$pd_section_data[10]['broken_period_no_of_months'].'
Turn Over for Broken Period in CY '.$rupee_symbol.''. MYUTIL::customIndianNumberFormat($pd_section_data[10]['broken_period_turnover_cy']).'Turn Over for Broken Period in PY '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($pd_section_data[10]['broken_period_turnover_py']).' ('.$uparrow.'/'. $downarrow.')in Turnover for Broken Period '.$pd_section_data[10]['broken_period_turnover_percent'].'%
Remarks on Financials >> '.$pd_section_data[10]['common_remarks'].'
-
+
Supplier Details
@@ -1018,7 +1125,7 @@ if(isset($pd_section_data[12]['common_remarks']) && !empty($pd_section_data[12][ // ''.$section13_value['provider_name'].''. ''.$section13_value['stock_type'].''. ''.$section13_value['provider_name'].''. - ''.(isset($section13_value['estimated_stock_value']) ? $section13_value['estimated_stock_value'] : 'NA').''. + ''.(isset($section13_value['estimated_stock_value']) ? $rupee_symbol.''.MYUTIL::customIndianNumberFormat($section13_value['estimated_stock_value']) : 'NA').''. ''.(isset($section13_value['estimated_quantity']) ? $section13_value['estimated_quantity'].' '.$section13_value['estimated_uom'] : 'NA').''.''; @@ -1040,8 +1147,7 @@ if(isset($pd_section_data[12]['common_remarks']) && !empty($pd_section_data[12][ ?> -
-
+
@@ -1139,7 +1245,7 @@ Business run by the applicant < /table>--> -
+
Existing Loan Obligations
@@ -1164,7 +1270,12 @@ Business run by the applicant'; + echo ''; + } + + if($pd_section_data[15]['common_remarks']) + { + echo ''; } @@ -1173,11 +1284,11 @@ Business run by the applicant
$value15) { - echo '
'. ($key15 + 1) .''. $value15['loan_type'] .''.$rupee_symbol.MYUTIL::customIndianNumberFormat($value15['loan_amount']).''.$value15['lender_name'].''.$value15['loan_taken_by'].''.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($value15['instalment_amount']).''.$value15['instalment_frequency'].''.$value15['original_tenure_months'].''.$value15['current_tenure_months'].''.$value15['elapsed_tenure_months'].'
'. ($key15 + 1) .''. $value15['loan_type'] .''.$rupee_symbol.MYUTIL::customIndianNumberFormat($value15['loan_amount']).''.$value15['lender_name'].''.$value15['loan_taken_by'].''.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($value15['instalment_amount']).''.$value15['instalment_frequency'].''.($value15['original_tenure_months'] != '' ? $value15['original_tenure_months'] : 'NA').''.($value15['current_tenure_months'] != '' ? $value15['current_tenure_months'] : 'NA').''.($value15['elapsed_tenure_months'] != '' ? $value15['elapsed_tenure_months'] : 'NA') .'
Remarks '. $pd_section_data[15]['common_remarks'] .'
-
+
- +
Neighbour Details
Neighbourhood Check Details
@@ -1190,8 +1301,8 @@ Business run by the applicant @@ -1268,16 +1379,6 @@ aforementioned status }?>
- +
- -
-
Satellite Image of PD Location

-

GPS Coordinates of location where PD Visit was done :

- - PD Visted Location Satellite Image - Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown

';} - ?> - 'Selfie with person met','person_met_id_proof' => 'Person met ID Proof','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','supplier_image' => 'Supplier Bills','client_image' => 'Client Bills','machinary_image' => 'Machinary Image');