Merge remote-tracking branch 'origin/master'

This commit is contained in:
Velz2020 2021-03-25 12:00:45 +05:30
commit 10db1fc452
6 changed files with 64 additions and 36 deletions

View File

@ -8167,7 +8167,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
#####End of Stock Form Questions########
#####Other Assest Form Questions########
#####Other Assest Form Questions########
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$other_asset_form = (json_decode($form_data[4][0]['processed_json'],true));
//print_r($other_asset_form);
@ -8195,7 +8196,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//echo 'over_all_asset_value from FUN - '.$over_all_asset_value;die();
// 18 Q.NO(1.9)
$score_questions['general']['value_of_other_assets'] = $over_all_asset_value;
}
#####End of Other Assest Form Questions########

View File

@ -492,28 +492,29 @@ class User_Management_Controller extends REST_Controller {
}
// print_r($rcm_state_mapping);
// die();
if(!empty($rcm_state_mapping)) {
$insert_value = array();
foreach($rcm_state_mapping as $key=>$value) {
if($value) {
array_push($insert_value,(object)[
"fk_user_id" => $user_id,
"fk_state_id" => $value,
"isactive" => "1"
]);
}
}
if(!empty($insert_value)) {
$res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value);
$rcmstate_msg = "RCM States Added";
}
}
// echo "\n old data \n";
// print_r($user_config['rcm_state_mapping']);
// echo "new data";
// print_r($rcm_state_mapping);
// die();
}
if(!empty($rcm_state_mapping)) {
$insert_value = array();
foreach($rcm_state_mapping as $key=>$value) {
if($value) {
array_push($insert_value,(object)[
"fk_user_id" => $user_id,
"fk_state_id" => $value,
"isactive" => "1"
]);
}
}
if(!empty($insert_value)) {
$res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value);
$rcmstate_msg = "RCM States Added";
}
}
}
/** END OF INSERTING THE RCM STATE MAPPING DATA */

View File

@ -10,8 +10,7 @@ class PDSCORE
//FULL PD SCORE CALCUALTIONS
public static function genericDIPDScoreCalculate($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details)
{
//echo 'RRRRR';die();
//print_r($personal_asset_grid);die();echo "###################";
// print_r($personal_asset_grid);die();echo "###################";
############ GENERIC SE-DI CASES #######################
############ SCROE VARIABLES DECLERATIONS ##############
@ -104,6 +103,12 @@ class PDSCORE
$general_distribute_level_weightage += $neibourhood_check_as_per_pd_officer_L2;
}
//CFPL means have to distribute the other asset value to $general_distribute_level_weightage
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$general_distribute_level_weightage += $value_of_other_assets_L2;
}
//End of General Section L2 Weightage Distribution section
@ -216,7 +221,7 @@ class PDSCORE
//######1.9 value of assets as a % of Loan Amount
//print_r($personal_asset_grid);
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$value_of_other_assets_L2 = $general_distribute_level_weightage ? ($value_of_other_assets_L2 + ($value_of_other_assets_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $value_of_other_assets_L2;
$asset_calculation_details = array();
@ -273,6 +278,7 @@ class PDSCORE
// echo "final_asset_score--".$final_asset_score;
// die();
$score_questions['general']['value_of_other_assets'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($value_of_other_assets_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['value_of_other_assets'],'attributed_score' => ($final_asset_attributed_score), 'max_score' => ((($l1_general/100 ) * ($value_of_other_assets_L2/100) * 10)),'score_band'=> $final_asset_score,'max_score_band' => 10);
}
/*-----------END OF GENERAL SECTION -----------*/
@ -584,8 +590,9 @@ class PDSCORE
}
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => (($overall_actual_score/$overall_max_score) * 100));
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$score_questions['score_summary']['asset_calculation_details'] = $asset_calculation_details;
}
//print_r($score_questions);die();
return ($score_questions);
@ -694,7 +701,9 @@ class PDSCORE
}
//End of General Section L2 Weightage Distribution section
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$general_distribute_level_weightage += $value_of_other_assets_L2;
}
//######1.7 otp_done
if($pd_master_details[0]['is_otp_enabled'] == 1)
@ -805,7 +814,7 @@ class PDSCORE
//######1.9 value of assets as a % of Loan Amount
//print_r($personal_asset_grid);
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$value_of_other_assets_L2 = $general_distribute_level_weightage ? ($value_of_other_assets_L2 + ($value_of_other_assets_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $value_of_other_assets_L2;
$asset_calculation_details = array();
@ -863,7 +872,7 @@ class PDSCORE
// die();
$score_questions['general']['value_of_other_assets'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($value_of_other_assets_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['value_of_other_assets'],'attributed_score' => ($final_asset_attributed_score), 'max_score' => ((($l1_general/100 ) * ($value_of_other_assets_L2/100) * 10)),'score_band'=> $final_asset_score,'max_score_band' => 10);
}
/*-----------END OF GENERAL SECTION -----------*/
/*-----------FINAL REMARKS SECTION -----------*/
@ -1170,8 +1179,9 @@ class PDSCORE
}
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => (($overall_actual_score/$overall_max_score) * 100));
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$score_questions['score_summary']['asset_calculation_details'] = $asset_calculation_details;
}
//print_r($score_questions);die();
return ($score_questions);
@ -1284,6 +1294,11 @@ class PDSCORE
// $general_distribute_level_weightage += $neibourhood_check_as_per_pd_officer_L2;
// }
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$general_distribute_level_weightage += $value_of_other_assets_L2;
}
//End of General Section L2 Weightage Distribution section
@ -1396,7 +1411,7 @@ class PDSCORE
//######1.9 value of assets as a % of Loan Amount
//print_r($personal_asset_grid);
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$value_of_other_assets_L2 = $general_distribute_level_weightage ? ($value_of_other_assets_L2 + ($value_of_other_assets_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $value_of_other_assets_L2;
$asset_calculation_details = array();
@ -1453,7 +1468,7 @@ class PDSCORE
// echo "final_asset_score--".$final_asset_score;
// die();
$score_questions['general']['value_of_other_assets'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($value_of_other_assets_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['value_of_other_assets'],'attributed_score' => ($final_asset_attributed_score), 'max_score' => ((($l1_general/100 ) * ($value_of_other_assets_L2/100) * 10)),'score_band'=> $final_asset_score,'max_score_band' => 10);
}
/*-----------END OF GENERAL SECTION -----------*/
@ -1755,10 +1770,15 @@ class PDSCORE
}
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => (($overall_actual_score/$overall_max_score) * 100));
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$score_questions['score_summary']['asset_calculation_details'] = $asset_calculation_details;
//print_r($score_questions);die();
return ($score_questions);
}
//else{
// unset($score_questions['general']['value_of_other_assets']);
// unset($score_questions['score_summary']['asset_calculation_details']);
// }
// print_r($score_questions);die();
// return ($score_questions);

View File

@ -897,7 +897,12 @@ if ( isset($pdf) ) {
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
}else{
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>");
}
@ -972,7 +977,7 @@ if ( isset($pdf) ) {
$answer = ucfirst($general_score['answer']);
if($gsk == 'value_of_other_assets')
if($gsk == 'value_of_other_assets' && $pd_master_details[0]['lender_short_name'] != 'CFPL')
{
//print_r($general_score);die();
$answer = round((($answer/$loan_form['loan_amount']) * 100),2) .' %';

View File

@ -900,8 +900,9 @@ if ( isset($pdf) ) {
//######################### CHART ###########################
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
}else{$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>");}

View File

@ -898,9 +898,9 @@ if ( isset($pdf) ) {
//######################### CHART ###########################
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
if($pd_master_details[0]['lender_short_name'] != 'CFPL'){
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
}else{ $general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>"); }