PD REPORT

This commit is contained in:
velz 2019-03-27 23:17:32 +05:30
parent 9eccb41d1b
commit 6c431c9262
12 changed files with 1688 additions and 220 deletions

View File

@ -660,7 +660,8 @@ class PD_Controller extends REST_Controller {
$ch = curl_init();
$timeout = 5;
$url = 'https://ssa.sineedge.com/officertracking/'.$randomString;
$url = 'https://ssa.sineedge.com/officertracking/#/officertracking/'.$randomString;
//echo "$url";
curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
@ -2362,7 +2363,7 @@ class PD_Controller extends REST_Controller {
break;
case 4:
$processed_json = GETPROCESSEDJSON::convertOtherAssetForm($records,$formid);
$processed_json = $records;
//$processed_json = $records;
break;
case 5:
$processed_json = GETPROCESSEDJSON::convertAddressForm($records,$formid);
@ -3377,6 +3378,7 @@ class PD_Controller extends REST_Controller {
$temp_netprofit = 0;
$temp_grossprofit = 0;
$temp_netmargin = 0;
//print_r($sales_by_item_monthwise);
foreach($sales_by_item_monthwise as $monthwise_key => $sales_by_item_month)
{
$month_total = 0;
@ -3393,15 +3395,23 @@ class PD_Controller extends REST_Controller {
}
$month_total = $month_total + $temp;
}
$sales_monthwise[] = array('total' => $month_total,'no_of_months' => $i);
$sales_monthwise[] = array('total' => $month_total,'no_of_months' => $i,'sales_type' => $sales_by_item_month['sales_type']);
}
foreach($sales_monthwise as $sale)
{
//print_r($sale);
$annual_multuplier = 12 / $sale['no_of_months'];
$total_sales_monthwise = $total_sales_monthwise + ($sale['total'] * $annual_multuplier);
if($sale['sales_type'] == 1)
{
$total_sales_monthwise = $total_sales_monthwise + ($sale['total'] * $annual_multuplier);
}
else if($sale['sales_type'] == 2)
{
$total_sales_monthwise = $total_sales_monthwise + $sale['total'];
}
}
//calculation part
@ -4339,6 +4349,8 @@ class PD_Controller extends REST_Controller {
public function codeigniterViewTest_post()
{
// echo MYUTIL::customIndianNumberFormat(4589621);
// die();
$records = $this->post('records');
$pdid = $records['pd_id'];
$is_regenerate = 0;
@ -4357,27 +4369,27 @@ class PD_Controller extends REST_Controller {
//echo $score_for_chart;
//GET phantom script from DB
//$phantom_script = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomjs_local'),SCRIPTS);
$phantom_script = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomjs_local'),SCRIPTS);
//$exact_script = $phantom_script[0]['script_content'];
//print_r($exact_script);
//$exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script);
$exact_script = $phantom_script[0]['script_content'];
print_r($exact_script);
$exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script);
//print_r($exact_script);die();
//GENERATE CHART PART
// file_put_contents(APPPATH.'/views/js/phantomchart.js',$exact_script,LOCK_EX);
file_put_contents(APPPATH.'/views/js/phantomchart.js',$exact_script,LOCK_EX);
// $str = 'phantomjs '.APPPATH.'/views/js/phantomchart.js';
// exec($str,$ou);
// exec('phantom.exit();');
$str = 'phantomjs '.APPPATH.'/views/js/phantomchart.js';
exec($str,$ou);
exec('phantom.exit();');
// //print_r($ou);
// $chart_img_path = APPPATH.'/views/report_templates/chart.png';
// $type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
// $chart_img_content = file_get_contents($chart_img_path);
// $base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
// $data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
$chart_img_path = APPPATH.'/views/report_templates/chart.png';
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
$chart_img_content = file_get_contents($chart_img_path);
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
$data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
// echo $data['base64_pdscore_chart_url'];
//die();
//GENERATE CHART PART
@ -4391,8 +4403,10 @@ class PD_Controller extends REST_Controller {
$data['pd_processed_forms'][$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
}
//print_r(json_decode($data['pd_processed_forms'][20][0]['processed_json'],true));
//die();
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//echo $t; die();
//PDF Gen using DOM PDF
$pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
//End of PDF Gen using DOM PDF
@ -4492,10 +4506,6 @@ class PD_Controller extends REST_Controller {
//echo $str;
if(!strcmp($str,'AI')) { $ai_flag = 1; }
//echo $ai_flag;
//USING TEMPLATE ID , GET ASSESSED INCOME ASSIGNED OR NOT
$fields = array('*');
$where_condition_array = array('isactive' => 1,'form_id'=> 16,'fk_template_id' =>$pd_master_details[0]['fk_pd_template_id'] );
$rec = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,TEMPLATEFORMS);
$company_list = array();
$fields = array('json');
@ -4519,13 +4529,12 @@ class PD_Controller extends REST_Controller {
$form_array = array();
if($ai_flag == 0) // DI case
{
// echo "DI";
$form_array = array(
array('form_id' => 13,'form_name' => 'About Business'),
array('form_id' => 22,'form_name' => 'Business Assets'),
array('form_id' => 21,'form_name' => 'Business Banking'),
array('form_id' => 14,'form_name' => 'Financial Information'),
//array('form_id' => 16,'form_name' => 'Assessed Income'),
array('form_id' => 1,'form_name' => 'Supplier Details'),
array('form_id' => 2,'form_name' => 'Client Details'),
array('form_id' => 11,'form_name' => 'Stock Details'),
@ -4534,7 +4543,7 @@ class PD_Controller extends REST_Controller {
}
else // AI Case
{
// echo "AI";
$form_array = array(
array('form_id' => 13,'form_name' => 'About Business'),
array('form_id' => 22,'form_name' => 'Business Assets'),
@ -4546,6 +4555,9 @@ class PD_Controller extends REST_Controller {
array('form_id' => 11,'form_name' => 'Stock Details'),
);
}
foreach($company_list as $list_key => $company)
{
@ -4556,6 +4568,10 @@ class PD_Controller extends REST_Controller {
$client_form_status = 0;
foreach($form_array as $form)
{
$template_forms_count = 0;
if($form['form_id'] != 16)
{
$this->db->SELECT('count(*) as count');
$this->db->FROM(PDFORMDETAILSJSON.' as PDFORMDETAILSJSON');
$this->db->WHERE('PDFORMDETAILSJSON.fk_pd_id',$pd_id);
@ -4563,6 +4579,14 @@ class PD_Controller extends REST_Controller {
$this->db->WHERE('PDFORMDETAILSJSON.company_id',$company['company_order_id']);
$this->db->WHERE('PDFORMDETAILSJSON.isactive',1);
$template_forms_count = $this->db->GET()->result_array();
}
else
{
$fields = array('count(*) as count');
$where_condition_array = array('fk_pd_id'=>$pd_id,'company_id' => $company['company_order_id'],'is_completed' => 1);
$template_forms_count = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDASSESSEDINCOMEESTIMATIONOFGROSSPROFITTYPE);
}
// print_r($this->db->last_query());
// print_r($template_forms_count);echo $form['form_id'];
if($template_forms_count[0]['count'] != 0) {
@ -4777,11 +4801,16 @@ class PD_Controller extends REST_Controller {
public function getPDOfficerCurrentLocation_post()
{
$pdid = $this->post('pd_id');
//
//PDALERTS::pdnotification($pdid);
$enc_string = $this->post('pd_id');
$result_data = $this->db->SELECT('*')->FROM(PDOFFICERCURRENTLOCATION)->WHERE('fk_pd_id',$pdid)->ORDER_BY(PDOFFICERCURRENTLOCATIONID,'DESC')->LIMIT(1)->GET()->result_array();
$pdid = $this->db->SELECT('pd_id')->FROM(PDTRIGGER)->WHERE('random_string',$enc_string)->ORDER_BY(PDTRIGGERID,'DESC')->LIMIT(1)->GET()->result_array();
//print_r($this->db->last_query());
//print_r($pdid);
$pd_master_details = $this->PD_Model->getPDMasterDetails($pdid[0]['pd_id']);
$offcier_name = $pd_master_details[0]['pd_allocated_to'];
$result_data['officer_details']['officer_name'] = $offcier_name;
$result_data['location'] = $this->db->SELECT('*')->FROM(PDOFFICERCURRENTLOCATION)->WHERE('fk_pd_id',$pdid[0]['pd_id'])->ORDER_BY(PDOFFICERCURRENTLOCATIONID,'DESC')->LIMIT(1)->GET()->result_array();
if(count($result_data))
{
@ -5398,6 +5427,9 @@ class PD_Controller extends REST_Controller {
$form_data = $this->PD_Model->getScorablePDFormDetailsJSON($pdid);
//print_r($form_data);
//Get Latest Loan Amount form loan form.
$loan_amt_from_loam_form = json_decode($form_data[10][0]['processed_json'],true);
$loan_amt_from_loam_form = $loan_amt_from_loam_form['loan_amount'];
//seperate PD Scorable quesitons from JSON
$score_questions = $this->seperateScoreQuestions($form_data,$pd_master_details[0]['is_otp_done']);
@ -5426,14 +5458,14 @@ class PD_Controller extends REST_Controller {
switch($combination)
{
case 111111:
PDSCORE::calculatePDScore111($score_questions,$pd_master_details,$personal_asset_grid);
PDSCORE::calculatePDScore111($score_questions,$loan_amt_from_loam_form,$personal_asset_grid);
break;
default:
switch($pd_master_details[0]['fk_customer_segment'])
{
case 5:
$score_questions = PDSCORE::genericDI($score_questions,$pd_master_details,$personal_asset_grid);
$score_questions = PDSCORE::genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid);
break;
}
}
@ -5471,8 +5503,14 @@ class PD_Controller extends REST_Controller {
$score_questions['general']['person_met_is_applicant'] = 'yes';
}
}
//print_r($qualification_temp_array);
$qualification_temp_array = array_map(function($item){
return $item != "" || $item != null ? $item : 6;
},$qualification_temp_array);
//print_r($qualification_temp_array);
$min = count($qualification_temp_array) ? min($qualification_temp_array) : 6;
//print_r($qualification_temp_array);die();
//die();
// 2 - QNO(1.8) - Qualification
@ -5594,7 +5632,9 @@ class PD_Controller extends REST_Controller {
$supplier_count = count($manufacturing_details['main_raw_materials']) ? ++$supplier_count: $supplier_count;
}
//echo 'IN manu-'.$supplier_count;
}
if(array_key_exists('trade_details',$supplier_form))
@ -5602,11 +5642,13 @@ class PD_Controller extends REST_Controller {
foreach($supplier_form['trade_details'] as $trade_details)
{
$supplier_count = count($supplier_form['trade_details']) ? ++$supplier_count: $supplier_count;
$supplier_count = count($trade_details['trading_products']) ? ++$supplier_count: $supplier_count;
}
//echo 'IN trade-'.$supplier_count;
}
//echo $supplier_count;
// 16 - QNO(2.7) - atleast one supplier
$score_questions['business']['minimum_supplier_info'] = $supplier_count ? 'Provided':'Not Provided';
}
@ -5614,6 +5656,8 @@ class PD_Controller extends REST_Controller {
{
$score_questions['business']['minimum_supplier_info'] = 'Not Applicable';
}
//echo $score_questions['business']['minimum_supplier_info'];die();
#####End of supplier Form Questions########
@ -5639,7 +5683,7 @@ class PD_Controller extends REST_Controller {
foreach($client_form['trade_details'] as $trade_details)
{
$client_count = count($client_form['trade_details']) ? ++$client_count: $client_count;
$client_count = count($trade_details['trading_products']) ? ++$client_count: $client_count;
}
}
@ -5649,7 +5693,7 @@ class PD_Controller extends REST_Controller {
foreach($client_form['service_provider_details'] as $service_provider_details)
{
$client_count = count($client_form['service_provider_details']) ? ++$client_count: $client_count;
$client_count = count($service_provider_details['service_products']) ? ++$client_count: $client_count;
}
}
@ -5766,7 +5810,7 @@ class PD_Controller extends REST_Controller {
//pd_expense_id, fk_pd_id, expense_item_id, expense_value, fk_frequency_id, annual_expenses_value, isactive, fk_createdby, createdon, company_id, comments
$annual_emp_salary = ($records['employees_appx_salary'] * 12);
echo $annual_emp_salary;
//echo $annual_emp_salary;
$temp_array = array( 'fk_pd_id' => $records['pdid'],'expense_item_id' => 3,'expense_value' => $records['employees_appx_salary'],'fk_frequency_id' => 7, 'annual_expenses_value' => $annual_emp_salary,'fk_createdby' => $records['fk_createdby'],'company_id' => $records['company_id'],'comments' => 'Derived from Business Form');

Binary file not shown.

View File

@ -7,32 +7,32 @@ public static function getOthersAssetsDetails($values){
$mergeResult=array();
foreach($values as $fetchVal){
$storeValue=array();
$storeValue['assets_mode'] = $fetchVal['assets_mode'];
$storeValue['name_of_the_owner'] = $fetchVal['name_of_the_owner']['id']==0 ? $fetchVal['other_owner'] : $fetchVal['name_of_the_owner']['name'];
$storeValue['assets_mode'] = $fetchVal['assets_mode_master'];
$storeValue['name_of_the_owner'] = $fetchVal['name_of_the_owner'][0]['id']==0 ? $fetchVal['other_owner'] : $fetchVal['name_of_the_owner'][0]['name'];
// this is for investments type
if($fetchVal['assets_mode']==7){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value'];
switch($fetchVal['details'][0]['investments_type']) {
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['details'][0]['amount_of_invest'];
switch($fetchVal['details'][0]['investments_type_master']) {
case 1:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['other_investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['other_investments_type'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
case 2:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
case 3:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
case 4:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
case 5:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
case 6:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
break;
default:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type'].' with '.$fetchVal['details'][0]['bank_name'];
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['investments_type_master'].' with '.$fetchVal['details'][0]['in_which_organisation'];
}
@ -70,14 +70,14 @@ public static function getOthersAssetsDetails($values){
}
// this is machinaries
else if($fetchVal['assets_mode']==4){
$storeValue['approximate_market_value'] = '';
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['equipment_manufacturing_description'];
}
// this is for vehicle
else if($fetchVal['assets_mode']==3){
$storeValue['approximate_market_value'] = '';
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['manufacturer_model_vehicle'].' purchased in '. $fetchVal['purchase_year'];
@ -114,7 +114,7 @@ public static function getBusinessAssetsDetails($values){
$storeValue['business_approximate_market_value'] = '';
break;
case 'OWNED':
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner']['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner']['name'];
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner'][0]['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner'][0]['name'];
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['equipment_manufacturing_description'].' purchased in '.$fetchVal['business_purchase_year'];
$storeValue['business_approximate_market_value'] = 'Rs.'.$fetchVal['business_approximate_market_value'];
break;

View File

@ -17,7 +17,7 @@ public static function getPartnerDetails($values){
'share_holding' => $tag['shareholding'].'%',
'no_years_business' => $con_business_run,
'total_experience' => $tag['total_business_experiance'],
'previous_experience' => array_key_exists('total_business_previous_experience',$tag) ? $tag['total_business_previous_experience'] : '',
'previous_experience' => array_key_exists('total_business_previous_experience',$tag) ? $tag['total_business_previous_experience'] : 'NIL',
);
}, $values);

View File

@ -623,9 +623,11 @@ class GETPROCESSEDJSON
{
$CI->db->SELECT( $master_tables_field_names['PDAPPLICANTSDETAILS'] );
$CI->db->FROM(PDAPPLICANTSDETAILS);
$CI->db->WHERE('isactive',1);
//$CI->db->WHERE('isactive',1);
$CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$family_details['selected_person']);
$owner= $CI->db->GET()->result_array();
// print_r($CI->db->last_query());
// print_r($owner);
if(count($owner))
{
$selected_person_master = $owner[0][$master_tables_field_names['PDAPPLICANTSDETAILS']];
@ -744,7 +746,7 @@ class GETPROCESSEDJSON
}
}
return $raw_json;
return ($raw_json);
}
/*****************########## END OTHER FAMILY DETAILS FORM ##########**************/
@ -1601,7 +1603,7 @@ class GETPROCESSEDJSON
$master_tables_field_names = $CI->config->item('master_tables_field_names');
$master_tables_pkid = $CI->config->item('master_tables_pkid');
//print_r($raw_json);
//print_r($raw_json);die();
// GET KEYS FROM MASTER TABLE FOR SUPPLIER FORM
$fields = array('question', 'key', 'ismaster', 'master_name');
@ -1619,7 +1621,8 @@ class GETPROCESSEDJSON
$CI->db->WHERE('isactive',1);
$CI->db->WHERE( $master_tables_pkid['ASSETTYPE'] ,$assets_detail['assets_mode']);
$assest_mode_name= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
// print_r($assest_mode_name);
// print_r($CI->db->last_query());die();
if(count($assest_mode_name))
{
$raw_json['assets_details'][$assets_detail_key]['assets_mode_master'] = $assest_mode_name[0][$master_tables_field_names['ASSETTYPE']];

View File

@ -15,17 +15,17 @@ class MYUTIL
$digits_1 = strlen($no);
$i = 0;
$str = array();
$words = array('0' => '', '1' => 'one', '2' => 'two',
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six',
'7' => 'seven', '8' => 'eight', '9' => 'nine',
'10' => 'ten', '11' => 'eleven', '12' => 'twelve',
'13' => 'thirteen', '14' => 'fourteen',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
'18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',
'30' => 'thirty', '40' => 'forty', '50' => 'fifty',
'60' => 'sixty', '70' => 'seventy',
'80' => 'eighty', '90' => 'ninety');
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
$words = array('0' => '', '1' => 'One', '2' => 'Two',
'3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six',
'7' => 'Seven', '8' => 'Eight', '9' => 'Nine',
'10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve',
'13' => 'Thirteen', '14' => 'Fourteen',
'15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen',
'18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty',
'30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty',
'60' => 'Sixty', '70' => 'Seventy',
'80' => 'Eighty', '90' => 'Ninety');
$digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore');
while ($i < $digits_1) {
$divider = ($i == 2) ? 10 : 100;
$number = floor($no % $divider);
@ -81,8 +81,13 @@ class MYUTIL
$getSentense = $value['company_name'];
$getSentense .=' is a ';
$getSentense .=$value['business_entity_type']==1 ? $value['business_entity_type_other'] : $value['business_entity_type_master'];
$getSentense .=' ,formed on ';
$getSentense .=$value['business_date_object'] ? date("d-m-Y", strtotime($value['business_date_object'])) : '';
$getSentense .=' formed on ';
$year_and_month = $value['business_years'] . ' Years';
$year_and_month .= isset($value['business_month']) ? $value['business_month'] . ' months ago': ' ago';
$getSentense .=$value['business_date_object'] ? date("d-m-Y", strtotime($value['business_date_object'])) : $year_and_month;
$getSentense .='.';
return $getSentense;
//return $value['company_name'].' is a '.$value['business_entity_type']==1 ? $value['business_entity_type_other'] : $value['business_entity_type_master'] .' formed on '.date("d-m-Y", strtotime($value['business_date_object']));
@ -109,6 +114,13 @@ class MYUTIL
}
}
}
public static function customIndianNumberFormat($value)
{
$indian_num_format = numfmt_create( 'en_IN', NumberFormatter::CURRENCY );
//echo numfmt_format_currency($indian_num_format,$value, "INR");
return numfmt_format_currency($indian_num_format,$value, "INR");
}
}

View File

@ -8,7 +8,7 @@ class PDSCORE
}
public static function genericDI($score_questions,$pd_master_details,$personal_asset_grid)
public static function genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid)
{
//print_r($score_questions);echo "###################";
@ -107,7 +107,7 @@ class PDSCORE
$neibourhood_check_as_per_pd_officer_max_score = ($l1_general/100) * ($neibourhood_check_as_per_pd_officer_L2/100) * max($neibourhood_check_as_per_pd_officer);
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = array('l1_weightage' => $l1_general,'l2_weightage' => $neibourhood_check_as_per_pd_officer_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['neibourhood_check_as_per_pd_officer'],'attributed_score' => $neibourhood_check_as_per_pd_officer_actual_score, 'max_score' => $neibourhood_check_as_per_pd_officer_max_score,'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' => max($neibourhood_check_as_per_pd_officer));
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = array('l1_weightage' => $l1_general,'l2_weightage' => $neibourhood_check_as_per_pd_officer_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['neibourhood_check_as_per_pd_officer'],'attributed_score' => round($neibourhood_check_as_per_pd_officer_actual_score,2), 'max_score' => round($neibourhood_check_as_per_pd_officer_max_score,2),'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' => max($neibourhood_check_as_per_pd_officer));
}
@ -126,7 +126,7 @@ class PDSCORE
$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' => 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));
$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' => round($person_met_is_applicant_actual_score,2), 'max_score' => round($person_met_is_applicant_max_score,2),'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
@ -136,7 +136,7 @@ class PDSCORE
$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' => 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));
$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' => round($pd_location_approach_actual_score,2), 'max_score' => round($pd_location_approach_max_score,2),'score_band'=>$pd_location_approach[$score_questions['general']['pd_location_approach']],'max_score_band' => max($pd_location_approach));
//######1.3 comment_locality
@ -146,7 +146,7 @@ class PDSCORE
$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' => 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));
$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' => round($comment_locality_actual_score,2), 'max_score' => round($comment_locality_max_score,2),'score_band'=>$comment_locality[$score_questions['general']['comment_locality']],'max_score_band' => max($comment_locality));
//######1.4 customer_behaviour
@ -156,7 +156,7 @@ class PDSCORE
$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' => 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));
$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' => round($customer_behaviour_actual_score,2), 'max_score' => round($customer_behaviour_max_score,2),'score_band'=>$customer_behaviour[$score_questions['general']['customer_behaviour']],'max_score_band' => max($customer_behaviour));
//######1.6 was_the_company_name_board_sighted
@ -166,7 +166,7 @@ class PDSCORE
$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' => 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));
$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' => round($was_the_company_name_board_sighted_actual_score,2), 'max_score' => round($was_the_company_name_board_sighted_max_score,2),'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
@ -176,7 +176,7 @@ class PDSCORE
$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' => 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));
$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' => round($otp_done_actual_score,2), 'max_score' => round($otp_done_max_score,2),'score_band'=>$otp_done[$score_questions['general']['otp_done']],'max_score_band' => max($otp_done));
//######1.8 qualification
@ -187,7 +187,7 @@ class PDSCORE
$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' => 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']));
$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' => round($qualification_actual_score,2), 'max_score' => round($qualification_max_score,2),'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);
@ -199,8 +199,8 @@ class PDSCORE
$actual_value_of_assets = $score_questions['general']['value_of_other_assets'];
$asset_calculation_details['actual_value_of_assets'] = round($actual_value_of_assets,2);
//echo 'actual_value_of_assets -'.$actual_value_of_assets;die();
$loan_amount = $pd_master_details[0]['loan_amount'];
//print_r($loan_amt_from_loam_form);
$loan_amount = $loan_amt_from_loam_form;
$asset_calculation_details['loan_amount'] = $loan_amount;
//echo 'loan_amount - '.$loan_amount;
@ -240,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' => 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);
$score_questions['general']['value_of_other_assets'] = array('l1_weightage' => $l1_general,'l2_weightage' => round($value_of_other_assets_L2,2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['value_of_other_assets'],'attributed_score' => round($final_asset_attributed_score,2), 'max_score' => round((($l1_general/100 ) * ($value_of_other_assets_L2/100) * 10),2),'score_band'=> $final_asset_score,'max_score_band' => 10);
/*-----------END OF GENERAL SECTION -----------*/
@ -305,11 +305,11 @@ class PDSCORE
//######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 )) * $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'] ];
$stock_raw_material_enough_actual_score = ($l1_business/100) * ($stock_raw_material_enough_L2/100) * $stock_answer_scores [ strtolower($score_questions['business']['stock_raw_material_enough']) ];
$stock_raw_material_enough_max_score = strcasecmp($score_questions['business']['stock_raw_material_enough'],'Not Applicable')? ($l1_business/100) * ($stock_raw_material_enough_L2/100) * max($stock_answer_scores) : 0;
$stock_raw_material_enough_max_score = ($l1_business/100) * ($stock_raw_material_enough_L2/100) * max($stock_answer_scores);
$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) );
$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 [ strtolower($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 )) * $business_distribute_level_weightage) : $stock_finished_goods_enough_L2 ;
@ -318,7 +318,9 @@ class PDSCORE
$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;
$score_questions['business']['stock_finished_goods_enough'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($stock_finished_goods_enough_L2,2),'answer' => $score_questions['business']['stock_finished_goods_enough'],'attributed_score' => round($stock_finished_goods_enough_actual_score,2), 'max_score' => round($stock_finished_goods_enough_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $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" ],'max_score_band' => max($stock_answer_scores));
$temp_stock_finished_goods_enough = strtolower($score_questions['business']['stock_finished_goods_enough']);
$score_questions['business']['stock_finished_goods_enough'] = array('l1_weightage' => $l1_business,'l2_weightage' => round($stock_finished_goods_enough_L2,2),'answer' => $score_questions['business']['stock_finished_goods_enough'],'attributed_score' => round($stock_finished_goods_enough_actual_score,2), 'max_score' => round($stock_finished_goods_enough_max_score,2),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $stock_answer_scores [ $temp_stock_finished_goods_enough != "" || $temp_stock_finished_goods_enough != null ? $temp_stock_finished_goods_enough : "no" ],'max_score_band' => max($stock_answer_scores));

View File

@ -30,7 +30,7 @@ class Pdfgenerator
$canvas = $dompdf->get_canvas();
//$font = Font_Metrics::get_font("helvetica", "bold");
$font = null;
$canvas->page_text(515,750, "Page {PAGE_NUM} of {PAGE_COUNT}", $font,8, array(0,0,0));
$canvas->page_text(515,760, "Page {PAGE_NUM} of {PAGE_COUNT}", $font,8, array(0,0,0));
if ($stream) {
$dompdf->stream($filename.".pdf", array("Attachment" => 0));

View File

@ -685,7 +685,7 @@ class PD_Model extends SPARQ_Model {
*/
public function getPDMasterDetails($pdid)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');
@ -1378,7 +1378,7 @@ class PD_Model extends SPARQ_Model {
public function getScorablePDFormDetailsJSON($pdid)
{
$array = array(1,2,4,5,11,13,18,19,20,21,22);
$array = array(1,2,4,5,11,13,18,19,20,21,22,10);
$return_data = array();
foreach($array as $key => $value)
{

View File

@ -1 +1 @@
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 72.11;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 55;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 18 KiB