Merge branch 'master' of https://bitbucket.org/venbaittech/sparqapi
This commit is contained in:
commit
9d8e30c188
@ -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########
|
||||
|
||||
|
||||
@ -664,7 +664,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
//echo 'final';die();
|
||||
$id = $this->Sales_PD_Model->updateRecords($records,SALES_PD_DATA,array('sales_pd_id' => $records['sales_pd_id']));
|
||||
|
||||
CAMUNDA::completeSalesPDTask($id);
|
||||
CAMUNDA::completeSalesPDTask($records['sales_pd_id']);
|
||||
|
||||
$this->prepareSalesPDReport($records['sales_pd_id'],false);
|
||||
sleep(10);
|
||||
@ -1202,9 +1202,9 @@ public function filterSalesPDList_post() {
|
||||
|
||||
public function camundaTest_post()
|
||||
{
|
||||
// echo 'hi';
|
||||
echo 'hi';
|
||||
|
||||
CAMUNDA::completeSalesPDTask(1);
|
||||
// CAMUNDA::completeSalesPDTask(1);
|
||||
//CAMUNDA::startSalesPDInstance(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class Dash_Board_Model extends SPARQ_Model {
|
||||
|
||||
public function getDetailsOfPDType($fdate,$tdate,$cityarr,$lenderarr)
|
||||
{
|
||||
$smc_lender_id = (ENVIRONMENT == 'production' ? 7 : 35)
|
||||
$smc_lender_id = (ENVIRONMENT == 'production' ? 7 : 35);
|
||||
if(($lenderarr != "" || $lenderarr != null)&& ($cityarr != "" || $cityarr != null) && ($fdate && $tdate != '')){
|
||||
$sql_query = "SELECT if(fk_pd_type = 1,'FULL',if(fk_pd_type = 2,'SMART',if(fk_pd_type = 3,'TELE','NULL'))) as PDTYPE,pd_status,count(*) as count FROM t_pd_triggered where MONTH(createdon) = MONTH(CURDATE()) AND fk_lender_id != $smc_lender_id group by fk_pd_type,pd_status;";
|
||||
}
|
||||
|
||||
@ -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) .' %';
|
||||
|
||||
@ -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 >>");}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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 >>"); }
|
||||
|
||||
|
||||
|
||||
|
||||
@ -177,6 +177,33 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<td>PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['pincode_others'])){ echo $section1['pincode_others']; } else { echo $section1['pincode']; }?></td>
|
||||
</tr>
|
||||
|
||||
<?php if( $master[0]['sales_pd_type'] == 2){ ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Applicant qualification</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['applicant_qualification'];?></td>
|
||||
<tr>
|
||||
<td colspan="3">Mother's Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['mother_name'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Official Email ID</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['official_emailid'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Current residence Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['current_residence_address'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Current residence Address ownership (Rented/Owned) </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['current_residence_ownership'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Business address/office address (Rented/Owned) </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['business_office_address'];?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
@ -199,7 +226,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<!-- initially br statement due to extra question. changed to page break condition -->
|
||||
<?php if( $master[0]['sales_pd_type'] == 2){
|
||||
?> <div id="page_break"></div> <?php } else { ?> <br> <?php } ?>
|
||||
<table class="scorecard_table" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -408,13 +437,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<tr>
|
||||
<td colspan="3">Income to be Considered (Rs Per Annum) </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section5['income_considered'] )?></td>
|
||||
<td colspan="3" >Income Considered (Rs Per Mth) </td>
|
||||
<td colspan="3" ><?php if( $master[0]['sales_pd_type'] == 2){ echo "Margin %"; } else { echo "Income Considered (Rs Per Mth)"; } ?></td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo MYUTIL::customIndianNumberFormat( round(($section5['income_considered'] / 12 ),2) );?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Income assessment Program Recommended </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $section5['income_assessment_program_recommended']?></td>
|
||||
<td colspan="3" >Fixed Obligations (Rs per month) </td>
|
||||
<td colspan="3" ><?php if( $master[0]['sales_pd_type'] == 2){ echo "Fixed Obligations (Rs Per annum)"; } else { echo "Fixed Obligations (Rs per month)"; } ?></td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $section5['fixed_obligations'] )?></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
@ -475,7 +504,7 @@ if(isset($section6))
|
||||
<th class="thlargefont" colspan="10" >Final Remarks of Sales officer</th>
|
||||
</tr>
|
||||
|
||||
<?php if($master[0]['sales_pd_type'] == 1){?>
|
||||
<?php if($master[0]['sales_pd_type'] == 2){?>
|
||||
<tr>
|
||||
<td colspan="4" >Business activity seen during visit (Yes / No)</td>
|
||||
<td class="tdcenteralign" ><?php echo $section7['business_activity_seen']?></td>
|
||||
@ -492,7 +521,13 @@ if(isset($section6))
|
||||
<tr>
|
||||
<td colspan="2" >Any Other remarks </td>
|
||||
<td style="text-align: justify;" colspan="8" ><?php echo $section7['any_other_remarks']?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php if($master[0]['sales_pd_type'] == 2){?>
|
||||
<tr>
|
||||
<td colspan="4">Behaviour on call (Rude/Neutral/Good/Pleasant)</td>
|
||||
<td colspan="6" class="tdcenteralign" ><?php echo $section7['behaviour_call']?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user