A REVIEW CHANGED
This commit is contained in:
parent
acc6e0beb8
commit
9eccb41d1b
@ -2337,7 +2337,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$this->saveAssetRentAsBusinessExpensesFromBusinessAssestForm($records);
|
||||
}
|
||||
die();
|
||||
|
||||
|
||||
$fields = array('isactive' => 0);
|
||||
$where_condition_array = array('fk_form_id'=>$formid,'fk_pd_id'=>$pdid);
|
||||
@ -3353,13 +3353,16 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp_grossprofit = $temp_netprofit + $overall_business_expenses_total;
|
||||
|
||||
// This one changes as per 15/03/2019 Excel Review changes
|
||||
$temp_grossprofit = $temp_netprofit;// + $overall_business_expenses_total;
|
||||
$temp_netprofit = $temp_grossprofit - $overall_business_expenses_total;
|
||||
$temp_purchases = $total_sales_itemwise - $temp_grossprofit;
|
||||
$temp_netmargin = ($temp_netprofit/$total_sales_itemwise) * 100;
|
||||
}
|
||||
|
||||
$overall_summary_report['sales_calculated_by_itemwise']['sales_revenue'] = round($total_sales_itemwise);
|
||||
$purchases_flag ? $overall_summary_report['sales_calculated_by_itemwise']['purchases'] = round($temp_purchases) : $overall_summary_report['sales_calculated_by_itemwise']['cost_of_goods_sold'] = round($temp_purchases);
|
||||
$purchases_flag ? $overall_summary_report['sales_calculated_by_itemwise']['purchases'] = round($temp_purchases,2) : $overall_summary_report['sales_calculated_by_itemwise']['cost_of_goods_sold'] = round($temp_purchases);
|
||||
$overall_summary_report['sales_calculated_by_itemwise']['grossprofit'] = round($temp_grossprofit);
|
||||
$overall_summary_report['sales_calculated_by_itemwise']['business_expenses'] = round($overall_business_expenses_total);
|
||||
$overall_summary_report['sales_calculated_by_itemwise']['netprofit'] = round($temp_netprofit);
|
||||
@ -5498,6 +5501,8 @@ class PD_Controller extends REST_Controller {
|
||||
#####Final Remarks Form Questions########
|
||||
$final_remarks_form = (json_decode($form_data[20][0]['processed_json'],true));
|
||||
//print_r($final_remarks_form);
|
||||
|
||||
|
||||
// 6 - QNO(1.4) - customer behaviour
|
||||
$score_questions['general']['customer_behaviour'] = $final_remarks_form['final_custormer_remark_type_master'];
|
||||
|
||||
@ -5513,6 +5518,7 @@ class PD_Controller extends REST_Controller {
|
||||
$neighbourhood_form = (json_decode($form_data[19][0]['processed_json'],true));
|
||||
//print_r($neighbourhood_form);
|
||||
|
||||
|
||||
// 9 - QNO(1.5) - neibourhood_check_as_per_pd_officer
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = isset($neighbourhood_form['neighbourhood_status']) ? $neighbourhood_form['neighbourhood_status'] : 'Negative';
|
||||
#####End of Neighbourhood Form Questions########
|
||||
|
||||
@ -74,7 +74,7 @@ class PDSCORE
|
||||
$owned_vechile = array('yes' => 10, 'no' => 0);
|
||||
$minimum_supplier_info = array('Provided' => 10, 'Not Provided' => 0,'Not Applicable' => 0);
|
||||
$minimum_client_info = array('Provided' => 10, 'Not Provided' => 0,'Not Applicable' => 0);
|
||||
$stock_answer_scores = array('yes' => 10, 'no' => 0,'Not Applicable' => 0);
|
||||
$stock_answer_scores = array('yes' => 10, 'no' => 0,'not applicable' => 0);
|
||||
$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);
|
||||
$location_suited_for_busienss = array('well_suited' => 10 ,'fairly_suited' => 6,'not_suited.' => 0);
|
||||
@ -88,12 +88,15 @@ class PDSCORE
|
||||
/*-----------GENERAL SECTION -----------*/
|
||||
//echo "##################################################";
|
||||
|
||||
$over_all_general_l2 = 0;
|
||||
$over_all_general_round_l2 = 0;
|
||||
$general_distribute_level_weightage = 0;
|
||||
|
||||
//######1.5 neibourhood_check_as_per_pd_officer
|
||||
if(!strcmp($score_questions['general']['neibourhood_check_as_per_pd_officer'],'Could not verify'))
|
||||
{
|
||||
$general_distribute_level_weightage += neibourhood_check_as_per_pd_officer_L2;
|
||||
//echo "Yes could not";
|
||||
$general_distribute_level_weightage += $neibourhood_check_as_per_pd_officer_L2;
|
||||
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = array('l1_weightage' => $l1_general,'l2_weightage' => 0,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['neibourhood_check_as_per_pd_officer'],'attributed_score' => 0.00, 'max_score' => 0.00,'score_band'=>$neibourhood_check_as_per_pd_officer[$score_questions['general']['neibourhood_check_as_per_pd_officer'] != "" || $score_questions['general']['neibourhood_check_as_per_pd_officer'] != null ?$score_questions['general']['neibourhood_check_as_per_pd_officer']: "Negative" ],'max_score_band' => 0);
|
||||
}
|
||||
@ -116,79 +119,80 @@ class PDSCORE
|
||||
|
||||
//#######1.1 person_met_is_applicant
|
||||
|
||||
$person_met_is_applicant_L2 = $general_distribute_level_weightage ? ($person_met_is_applicant_L2 + ($person_met_is_applicant_L2 / (100 - $general_distribute_level_weightage ))) : $person_met_is_applicant_L2 ;
|
||||
$person_met_is_applicant_L2 = $general_distribute_level_weightage ? ($person_met_is_applicant_L2 + ($person_met_is_applicant_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $person_met_is_applicant_L2 ;
|
||||
|
||||
|
||||
$person_met_is_applicant_actual_score = ($l1_general/100) * ($person_met_is_applicant_L2/100) * $person_met_is_applicant[$score_questions['general']['person_met_is_applicant']];
|
||||
|
||||
$person_met_is_applicant_max_score = ($l1_general/100) * ($person_met_is_applicant_L2/100) * max($person_met_is_applicant);
|
||||
|
||||
$score_questions['general']['person_met_is_applicant'] = array('l1_weightage' => $l1_general,'l2_weightage' => $person_met_is_applicant_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['person_met_is_applicant'],'attributed_score' => $person_met_is_applicant_actual_score, 'max_score' => $person_met_is_applicant_max_score,'score_band'=>($person_met_is_applicant[$score_questions['general']['person_met_is_applicant']]),'max_score_band' => max($person_met_is_applicant));
|
||||
$score_questions['general']['person_met_is_applicant'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($person_met_is_applicant_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['person_met_is_applicant'],'attributed_score' => $person_met_is_applicant_actual_score, 'max_score' => $person_met_is_applicant_max_score,'score_band'=>($person_met_is_applicant[$score_questions['general']['person_met_is_applicant']]),'max_score_band' => max($person_met_is_applicant));
|
||||
|
||||
//######1.2 pd_location_approach
|
||||
|
||||
$pd_location_approach_L2 = $general_distribute_level_weightage ? ($pd_location_approach_L2 + ($pd_location_approach_L2 / (100 - $general_distribute_level_weightage ))) : $pd_location_approach_L2 ;
|
||||
$pd_location_approach_L2 = $general_distribute_level_weightage ? ($pd_location_approach_L2 + ($pd_location_approach_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $pd_location_approach_L2 ;
|
||||
|
||||
$pd_location_approach_actual_score = ($l1_general/100) * ($pd_location_approach_L2/100) * $pd_location_approach[$score_questions['general']['pd_location_approach']];
|
||||
|
||||
$pd_location_approach_max_score = ($l1_general/100) * ($pd_location_approach_L2/100) * max($pd_location_approach);
|
||||
|
||||
$score_questions['general']['pd_location_approach'] = array('l1_weightage' => $l1_general,'l2_weightage' => $pd_location_approach_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['pd_location_approach'],'attributed_score' => $pd_location_approach_actual_score, 'max_score' => $pd_location_approach_max_score,'score_band'=>$pd_location_approach[$score_questions['general']['pd_location_approach']],'max_score_band' => max($pd_location_approach));
|
||||
$score_questions['general']['pd_location_approach'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($pd_location_approach_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['pd_location_approach'],'attributed_score' => $pd_location_approach_actual_score, 'max_score' => $pd_location_approach_max_score,'score_band'=>$pd_location_approach[$score_questions['general']['pd_location_approach']],'max_score_band' => max($pd_location_approach));
|
||||
|
||||
//######1.3 comment_locality
|
||||
|
||||
$comment_locality_L2 = $general_distribute_level_weightage ? ($comment_locality_L2 + ($comment_locality_L2 / (100 - $general_distribute_level_weightage ))) : $comment_locality_L2;
|
||||
$comment_locality_L2 = $general_distribute_level_weightage ? ($comment_locality_L2 + ($comment_locality_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $comment_locality_L2;
|
||||
|
||||
$comment_locality_actual_score = ($l1_general/100) * ($comment_locality_L2/100) * $comment_locality[$score_questions['general']['comment_locality']];
|
||||
|
||||
$comment_locality_max_score = ($l1_general/100) * ($comment_locality_L2/100) * max($comment_locality);
|
||||
|
||||
$score_questions['general']['comment_locality'] = array('l1_weightage' => $l1_general,'l2_weightage' => $comment_locality_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['comment_locality'],'attributed_score' => $comment_locality_actual_score, 'max_score' => $comment_locality_max_score,'score_band'=>$comment_locality[$score_questions['general']['comment_locality']],'max_score_band' => max($comment_locality));
|
||||
$score_questions['general']['comment_locality'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($comment_locality_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['comment_locality'],'attributed_score' => $comment_locality_actual_score, 'max_score' => $comment_locality_max_score,'score_band'=>$comment_locality[$score_questions['general']['comment_locality']],'max_score_band' => max($comment_locality));
|
||||
|
||||
//######1.4 customer_behaviour
|
||||
|
||||
$customer_behaviour_L2 = $general_distribute_level_weightage ? ($customer_behaviour_L2 + ($customer_behaviour_L2 / (100 - $general_distribute_level_weightage ))) : $customer_behaviour_L2;
|
||||
$customer_behaviour_L2 = $general_distribute_level_weightage ? ($customer_behaviour_L2 + ($customer_behaviour_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $customer_behaviour_L2;
|
||||
|
||||
$customer_behaviour_actual_score = ($l1_general/100) * ($customer_behaviour_L2/100) * $customer_behaviour[$score_questions['general']['customer_behaviour']];
|
||||
|
||||
$customer_behaviour_max_score = ($l1_general/100) * ($customer_behaviour_L2/100) * max($customer_behaviour);
|
||||
|
||||
$score_questions['general']['customer_behaviour'] = array('l1_weightage' => $l1_general,'l2_weightage' => $customer_behaviour_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['customer_behaviour'],'attributed_score' => $customer_behaviour_actual_score, 'max_score' => $customer_behaviour_max_score,'score_band'=>$customer_behaviour[$score_questions['general']['customer_behaviour']],'max_score_band' => max($customer_behaviour));
|
||||
$score_questions['general']['customer_behaviour'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($customer_behaviour_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['customer_behaviour'],'attributed_score' => $customer_behaviour_actual_score, 'max_score' => $customer_behaviour_max_score,'score_band'=>$customer_behaviour[$score_questions['general']['customer_behaviour']],'max_score_band' => max($customer_behaviour));
|
||||
|
||||
//######1.6 was_the_company_name_board_sighted
|
||||
|
||||
$was_the_company_name_board_sighted_L2 = $general_distribute_level_weightage ? ($was_the_company_name_board_sighted_L2 + ($was_the_company_name_board_sighted_L2 / (100 - $general_distribute_level_weightage ))) : $was_the_company_name_board_sighted_L2;
|
||||
$was_the_company_name_board_sighted_L2 = $general_distribute_level_weightage ? ($was_the_company_name_board_sighted_L2 + ($was_the_company_name_board_sighted_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $was_the_company_name_board_sighted_L2;
|
||||
|
||||
$was_the_company_name_board_sighted_actual_score = ($l1_general/100) * ($was_the_company_name_board_sighted_L2/100) * $was_the_company_name_board_sighted[$score_questions['general']['was_the_company_name_board_sighted']];
|
||||
|
||||
$was_the_company_name_board_sighted_max_score = ($l1_general/100) * ($was_the_company_name_board_sighted_L2/100) * max($was_the_company_name_board_sighted);
|
||||
|
||||
$score_questions['general']['was_the_company_name_board_sighted'] = array('l1_weightage' => $l1_general,'l2_weightage' => $was_the_company_name_board_sighted_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['was_the_company_name_board_sighted'],'attributed_score' => $was_the_company_name_board_sighted_actual_score, 'max_score' => $was_the_company_name_board_sighted_max_score,'score_band'=>$was_the_company_name_board_sighted[$score_questions['general']['was_the_company_name_board_sighted']],'max_score_band' => max($was_the_company_name_board_sighted));
|
||||
$score_questions['general']['was_the_company_name_board_sighted'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($was_the_company_name_board_sighted_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['was_the_company_name_board_sighted'],'attributed_score' => $was_the_company_name_board_sighted_actual_score, 'max_score' => $was_the_company_name_board_sighted_max_score,'score_band'=>$was_the_company_name_board_sighted[$score_questions['general']['was_the_company_name_board_sighted']],'max_score_band' => max($was_the_company_name_board_sighted));
|
||||
|
||||
//######1.7 otp_done
|
||||
|
||||
$otp_done_L2 = $general_distribute_level_weightage ? ($otp_done_L2 + ($otp_done_L2 / (100 - $general_distribute_level_weightage ))) : $otp_done_L2;
|
||||
$otp_done_L2 = $general_distribute_level_weightage ? ($otp_done_L2 + ($otp_done_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $otp_done_L2;
|
||||
|
||||
$otp_done_actual_score = ($l1_general/100) * ($otp_done_L2/100) * $otp_done[$score_questions['general']['otp_done']];
|
||||
|
||||
$otp_done_max_score = ($l1_general/100) * ($otp_done_L2/100) * max($otp_done);
|
||||
|
||||
$score_questions['general']['otp_done'] = array('l1_weightage' => $l1_general,'l2_weightage' => $otp_done_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['otp_done'],'attributed_score' => $otp_done_actual_score, 'max_score' => $otp_done_max_score,'score_band'=>$otp_done[$score_questions['general']['otp_done']],'max_score_band' => max($otp_done));
|
||||
$score_questions['general']['otp_done'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($otp_done_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['otp_done'],'attributed_score' => $otp_done_actual_score, 'max_score' => $otp_done_max_score,'score_band'=>$otp_done[$score_questions['general']['otp_done']],'max_score_band' => max($otp_done));
|
||||
|
||||
//######1.8 qualification
|
||||
|
||||
$qualification_L2 = $general_distribute_level_weightage ? ($qualification_L2 + ($qualification_L2 / (100 - $general_distribute_level_weightage ))) : $qualification_L2;
|
||||
$qualification_L2 = $general_distribute_level_weightage ? ($qualification_L2 + ($qualification_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $qualification_L2;
|
||||
|
||||
$qualification_actual_score = ($l1_general/100) * ($qualification_L2/100) * $qualification['id_score'][$score_questions['general']['qualification']];
|
||||
|
||||
$qualification_max_score = ($l1_general/100) * ($qualification_L2/100) * max($qualification['id_score']);
|
||||
$keys = array_keys($qualification['name_score']);
|
||||
|
||||
$score_questions['general']['qualification'] = array('l1_weightage' => $l1_general,'l2_weightage' => $qualification_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $keys[($score_questions['general']['qualification']-1)],'attributed_score' => $qualification_actual_score, 'max_score' => $qualification_max_score,'score_band'=>$qualification['id_score'][$score_questions['general']['qualification']],'max_score_band' => max($qualification['id_score']));
|
||||
$score_questions['general']['qualification'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($qualification_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $keys[($score_questions['general']['qualification']-1)],'attributed_score' => $qualification_actual_score, 'max_score' => $qualification_max_score,'score_band'=>$qualification['id_score'][$score_questions['general']['qualification']],'max_score_band' => max($qualification['id_score']));
|
||||
|
||||
//######1.9 value of assets as a % of Loan Amount
|
||||
//print_r($personal_asset_grid);
|
||||
|
||||
$value_of_other_assets_L2 = $general_distribute_level_weightage ? ($value_of_other_assets_L2 + ($value_of_other_assets_L2 / (100 - $general_distribute_level_weightage ))) : $value_of_other_assets_L2;
|
||||
$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();
|
||||
|
||||
@ -236,7 +240,7 @@ class PDSCORE
|
||||
$asset_calculation_details['score'] = $final_asset_score;
|
||||
// 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);
|
||||
$score_questions['general']['value_of_other_assets'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($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 -----------*/
|
||||
@ -248,7 +252,7 @@ class PDSCORE
|
||||
|
||||
$pd_officer_recommandations_max_score = ($l1_final/100) * ($pd_officer_recommadations_L2/100) * max($pd_officer_recommandations);
|
||||
|
||||
$score_questions['final_remarks']['pd_officer_recommandations'] = array('l1_weightage' => $l1_final,'l2_weightage' => $pd_officer_recommadations_L2,'distributed_weightage' => 0,'answer' => $score_questions['final_remarks']['pd_officer_recommandations'],'attributed_score' => $pd_officer_recommandations_actual_score, 'max_score' => $pd_officer_recommandations_max_score,'score_band'=>$pd_officer_recommandations[ $score_questions['final_remarks']['pd_officer_recommandations'] ],'max_score_band' => max($pd_officer_recommandations));
|
||||
$score_questions['final_remarks']['pd_officer_recommandations'] = array('l1_weightage' => $l1_final,'l2_weightage' => $pd_officer_recommadations_L2,'distributed_weightage' => 0,'answer' => $score_questions['final_remarks']['pd_officer_recommandations'],'attributed_score' => round($pd_officer_recommandations_actual_score,2), 'max_score' => $pd_officer_recommandations_max_score,'score_band'=>$pd_officer_recommandations[ $score_questions['final_remarks']['pd_officer_recommandations'] ],'max_score_band' => max($pd_officer_recommandations));
|
||||
/*-----------END OF FINAL REMARKS SECTION -----------*/
|
||||
|
||||
|
||||
@ -281,7 +285,7 @@ class PDSCORE
|
||||
//echo $business_distribute_level_weightage;
|
||||
|
||||
//######2.7 atleast one supplier info provided
|
||||
$minimum_supplier_info_L2 = $business_distribute_level_weightage ? ($minimum_supplier_info_L2 + ($minimum_supplier_info_L2 / (100 - $business_distribute_level_weightage ))) : $minimum_supplier_info_L2 ;
|
||||
$minimum_supplier_info_L2 = $business_distribute_level_weightage ? ($minimum_supplier_info_L2 + ($minimum_supplier_info_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $minimum_supplier_info_L2 ;
|
||||
|
||||
$minimum_supplier_info_actual_score = ($l1_business/100) * ($minimum_supplier_info_L2/100) * $minimum_supplier_info [ $score_questions['business']['minimum_supplier_info'] ];
|
||||
|
||||
@ -290,7 +294,7 @@ class PDSCORE
|
||||
$score_questions['business']['minimum_supplier_info'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($minimum_supplier_info_L2,2),'answer' => $score_questions['business']['minimum_supplier_info'],'attributed_score' => round($minimum_supplier_info_actual_score,2), 'max_score' => round($minimum_supplier_info_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band'=>$minimum_supplier_info [ $score_questions['business']['minimum_supplier_info'] ],'max_score_band' => max($minimum_supplier_info));
|
||||
|
||||
//######2.8 atleast one client info provided
|
||||
$minimum_client_info_L2 = $business_distribute_level_weightage ? ($minimum_client_info_L2 + ($minimum_client_info_L2 / (100 - $business_distribute_level_weightage ))) : $minimum_client_info_L2 ;
|
||||
$minimum_client_info_L2 = $business_distribute_level_weightage ? ($minimum_client_info_L2 + ($minimum_client_info_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $minimum_client_info_L2 ;
|
||||
|
||||
$minimum_client_info_actual_score = ($l1_business/100) * ($minimum_client_info_L2/100) * $minimum_client_info [ $score_questions['business']['minimum_client_info'] ];
|
||||
|
||||
@ -299,7 +303,7 @@ class PDSCORE
|
||||
$score_questions['business']['minimum_client_info'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($minimum_client_info_L2,2),'answer' => $score_questions['business']['minimum_client_info'],'attributed_score' => round($minimum_client_info_actual_score,2), 'max_score' => round($minimum_client_info_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band'=>$minimum_client_info [ $score_questions['business']['minimum_client_info'] ],'max_score_band' => max($minimum_client_info));
|
||||
|
||||
//######2.9 stock of raw material
|
||||
$stock_raw_material_enough_L2 = $business_distribute_level_weightage ? ($stock_raw_material_enough_L2 + ($stock_raw_material_enough_L2 / (100 - $business_distribute_level_weightage ))) : $stock_raw_material_enough_L2 ;
|
||||
$stock_raw_material_enough_L2 = $business_distribute_level_weightage ? ($stock_raw_material_enough_L2 + ($stock_raw_material_enough_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $stock_raw_material_enough_L2 ;
|
||||
|
||||
$stock_raw_material_enough_actual_score = ($l1_business/100) * ($stock_raw_material_enough_L2/100) * $stock_answer_scores [ $score_questions['business']['stock_raw_material_enough'] ];
|
||||
|
||||
@ -308,9 +312,9 @@ class PDSCORE
|
||||
$score_questions['business']['stock_raw_material_enough'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($stock_raw_material_enough_L2,2),'answer' => $score_questions['business']['stock_raw_material_enough'],'attributed_score' => round($stock_raw_material_enough_actual_score,2), 'max_score' => round($stock_raw_material_enough_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $stock_answer_scores [ $score_questions['business']['stock_raw_material_enough'] ],'max_score_band' =>max($stock_answer_scores) );
|
||||
|
||||
//######2.10 stock_finished_goods_enough
|
||||
$stock_finished_goods_enough_L2 = $business_distribute_level_weightage ? ($stock_finished_goods_enough_L2 + ($stock_finished_goods_enough_L2 / (100 - $business_distribute_level_weightage ))) : $stock_finished_goods_enough_L2 ;
|
||||
$stock_finished_goods_enough_L2 = $business_distribute_level_weightage ? ($stock_finished_goods_enough_L2 + ($stock_finished_goods_enough_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $stock_finished_goods_enough_L2 ;
|
||||
|
||||
$stock_finished_goods_enough_actual_score = ($l1_business/100) * ($stock_finished_goods_enough_L2/100) * $stock_answer_scores [ $score_questions['business']['stock_finished_goods_enough'] != "" || $score_questions['business']['stock_finished_goods_enough'] != null ? $score_questions['business']['stock_finished_goods_enough'] : "no" ];
|
||||
$stock_finished_goods_enough_actual_score = ($l1_business/100) * ($stock_finished_goods_enough_L2/100) * $stock_answer_scores [ $score_questions['business']['stock_finished_goods_enough'] != "" || $score_questions['business']['stock_finished_goods_enough'] != null ? strtolower($score_questions['business']['stock_finished_goods_enough']) : "no" ];
|
||||
|
||||
$stock_finished_goods_enough_max_score = strcasecmp($score_questions['business']['stock_finished_goods_enough'],'Not Applicable') ? ($l1_business/100) * ($stock_finished_goods_enough_L2/100) * max($stock_answer_scores) : 0;
|
||||
|
||||
@ -320,7 +324,7 @@ class PDSCORE
|
||||
|
||||
//######2.1 Business Certificates
|
||||
|
||||
$cerificates_L2 = $business_distribute_level_weightage ? ($cerificates_L2 + ($cerificates_L2 / (100 - $business_distribute_level_weightage ))) : $cerificates_L2;
|
||||
$cerificates_L2 = $business_distribute_level_weightage ? ($cerificates_L2 + ($cerificates_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $cerificates_L2;
|
||||
|
||||
//find out no of not applicable cases
|
||||
$business_certificates_distribution_count = 0;
|
||||
@ -382,7 +386,7 @@ class PDSCORE
|
||||
if($left_exp && $right_exp)
|
||||
{
|
||||
|
||||
$no_of_years_business_run_L2 = $business_distribute_level_weightage ? ($no_of_years_business_run_L2 + ($no_of_years_business_run_L2 / (100 - $business_distribute_level_weightage ))) : $no_of_years_business_run_L2 ;
|
||||
$no_of_years_business_run_L2 = $business_distribute_level_weightage ? ($no_of_years_business_run_L2 + ($no_of_years_business_run_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $no_of_years_business_run_L2 ;
|
||||
|
||||
$no_of_years_business_run_actual_score = ($l1_business/100) * ($no_of_years_business_run_L2/100) * $value;
|
||||
$score_band = $value;
|
||||
@ -400,7 +404,7 @@ class PDSCORE
|
||||
//######2.2 business seasonal
|
||||
|
||||
|
||||
$business_seasonality_L2 = $business_distribute_level_weightage ? ($business_seasonality_L2 + ($business_seasonality_L2 / (100 - $business_distribute_level_weightage ))) : $business_seasonality_L2 ;
|
||||
$business_seasonality_L2 = $business_distribute_level_weightage ? ($business_seasonality_L2 + ($business_seasonality_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $business_seasonality_L2 ;
|
||||
|
||||
$business_seasonality_actual_score = ($l1_business/100) * ($business_seasonality_L2/100) * $business_seasonality[ $score_questions['business']['business_seasonality'] ];
|
||||
|
||||
@ -411,7 +415,7 @@ class PDSCORE
|
||||
//######2.3 employees_total
|
||||
$employees_total_actual_score = 0;
|
||||
|
||||
$employees_total_L2 = $business_distribute_level_weightage ? ($employees_total_L2 + ($employees_total_L2 / (100 - $business_distribute_level_weightage ))) : $employees_total_L2 ;
|
||||
$employees_total_L2 = $business_distribute_level_weightage ? ($employees_total_L2 + ($employees_total_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $employees_total_L2 ;
|
||||
$score_band = 0;
|
||||
foreach($employees_total as $key => $value)
|
||||
{
|
||||
@ -439,7 +443,7 @@ class PDSCORE
|
||||
|
||||
//######2.5 owned_property
|
||||
|
||||
$owned_property_L2 = $business_distribute_level_weightage ? ($owned_property_L2 + ($owned_property_L2 / (100 - $business_distribute_level_weightage ))) : $owned_property_L2 ;
|
||||
$owned_property_L2 = $business_distribute_level_weightage ? ($owned_property_L2 + ($owned_property_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $owned_property_L2 ;
|
||||
|
||||
$owned_property_actual_score = ($l1_business/100) * ($owned_property_L2/100) * $owned_property[ $score_questions['business']['owned_property'] ];
|
||||
$owned_property_max_score = ($l1_business/100) * ($owned_property_L2/100) * max($owned_property);
|
||||
@ -447,7 +451,7 @@ class PDSCORE
|
||||
$score_questions['business']['owned_property'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($owned_property_L2,2),'answer' => $score_questions['business']['owned_property'],'attributed_score' => round($owned_property_actual_score,2), 'max_score' => round($owned_property_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $owned_property[ $score_questions['business']['owned_property'] ],'max_score_band' => max($owned_property));
|
||||
|
||||
//######2.6 owned_vechile
|
||||
$owned_vechile_L2 = $business_distribute_level_weightage ? ($owned_vechile_L2 + ($owned_vechile_L2 / (100 - $business_distribute_level_weightage ))) : $owned_vechile_L2 ;
|
||||
$owned_vechile_L2 = $business_distribute_level_weightage ? ($owned_vechile_L2 + ($owned_vechile_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $owned_vechile_L2 ;
|
||||
|
||||
$owned_vechile_actual_score = ($l1_business/100) * ($owned_vechile_L2/100) * $owned_vechile[ $score_questions['business']['owned_vechile'] ];
|
||||
$owned_vechile_max_score = ($l1_business/100) * ($owned_vechile_L2/100) * max($owned_vechile);
|
||||
@ -456,7 +460,7 @@ class PDSCORE
|
||||
|
||||
//######2.11 location_suited_for_busienss
|
||||
|
||||
$location_suited_for_busienss_L2 = $business_distribute_level_weightage ? ($location_suited_for_busienss_L2 + ($location_suited_for_busienss_L2 / (100 - $business_distribute_level_weightage ))) : $location_suited_for_busienss_L2 ;
|
||||
$location_suited_for_busienss_L2 = $business_distribute_level_weightage ? ($location_suited_for_busienss_L2 + ($location_suited_for_busienss_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $location_suited_for_busienss_L2 ;
|
||||
|
||||
$location_suited_for_busienss_actual_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * $location_suited_for_busienss[ $score_questions['business']['location_suited_for_busienss'] ];
|
||||
$location_suited_for_busienss_max_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * max($location_suited_for_busienss);
|
||||
@ -465,7 +469,7 @@ class PDSCORE
|
||||
|
||||
//######2.11 business_activity_has_seen
|
||||
|
||||
$business_activity_has_seen_L2 = $business_distribute_level_weightage ? ($business_activity_has_seen_L2 + ($business_activity_has_seen_L2 / (100 - $business_distribute_level_weightage ))) : $business_activity_has_seen_L2 ;
|
||||
$business_activity_has_seen_L2 = $business_distribute_level_weightage ? ($business_activity_has_seen_L2 + ($business_activity_has_seen_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $business_activity_has_seen_L2 ;
|
||||
|
||||
$business_activity_has_seen_actual_score = ($l1_business/100) * ($business_activity_has_seen_L2/100) * $business_activity_has_seen[ $score_questions['business']['business_activity_has_seen'] ];
|
||||
$business_activity_has_seen_max_score = ($l1_business/100) * ($business_activity_has_seen_L2/100) * max($business_activity_has_seen);
|
||||
@ -474,7 +478,7 @@ class PDSCORE
|
||||
|
||||
//######2.13 vintage business banking
|
||||
|
||||
$vintage_of_business_account_L2 = $business_distribute_level_weightage ? ($vintage_of_business_account_L2 + ($vintage_of_business_account_L2 / (100 - $business_distribute_level_weightage ))) : $vintage_of_business_account_L2 ;
|
||||
$vintage_of_business_account_L2 = $business_distribute_level_weightage ? ($vintage_of_business_account_L2 + ($vintage_of_business_account_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $vintage_of_business_account_L2 ;
|
||||
|
||||
$vintage_of_business_account_actual_score = 0;
|
||||
$score_band = 0;
|
||||
@ -527,7 +531,7 @@ class PDSCORE
|
||||
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => round(($overall_actual_score/$overall_max_score) * 100));
|
||||
|
||||
$score_questions['score_summary']['asset_calculation_details'] = $asset_calculation_details;
|
||||
print_r($score_questions);die();
|
||||
//print_r($score_questions);die();
|
||||
return ($score_questions);
|
||||
|
||||
|
||||
|
||||
@ -728,7 +728,7 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
if($result_array[0]['fk_product_id'] == "" || $result_array[0]['fk_product_id'] == null){ $mandatory_fields[] = 'fk_product_id'; }
|
||||
|
||||
if($result_array[0]['fk_subproduct_id'] == "" || $result_array[0]['fk_subproduct_id'] == null){ $mandatory_fields[] = 'fk_subproduct_id'; }
|
||||
//if($result_array[0]['fk_subproduct_id'] == "" || $result_array[0]['fk_subproduct_id'] == null){ $mandatory_fields[] = 'fk_subproduct_id'; }
|
||||
|
||||
if($result_array[0]['fk_pd_type'] == "" || $result_array[0]['fk_pd_type'] == null){ $mandatory_fields[] = 'fk_pd_type'; }
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if($key == 'cerificates')
|
||||
{
|
||||
$certificates = $business;
|
||||
echo '<tr>'.'<td> Certificates </td><td>'.round($business['l2_weightage'],2).'%</td><td>'.'Refer Cert Table'.'</td><td>'.$business['score_band'].'</td><td>'.$business['attributed_score'].'</td><td>'.$general['max_score'].'</td></tr>';
|
||||
echo '<tr>'.'<td> Certificates </td><td>'.round($business['l2_weightage'],2).'%</td><td>'.'Refer Cert Table'.'</td><td>'.$business['score_band'].'</td><td>'.$business['attributed_score'].'</td><td>'.$business['max_score'].'</td></tr>';
|
||||
}
|
||||
|
||||
}
|
||||
@ -396,7 +396,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- ####################### End Of General Section Statred ############################-->
|
||||
<!-- ####################### End Of General Section ############################-->
|
||||
|
||||
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@
|
||||
* Different environments will require different levels of error reporting.
|
||||
* By default development will show errors but testing and live will hide them.
|
||||
*/
|
||||
|
||||
switch (ENVIRONMENT)
|
||||
{
|
||||
case 'development':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user