Report Issues
This commit is contained in:
parent
301c1f2627
commit
0e1f3f6d7c
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ api/application/vendor/*
|
||||
api/application/logs/*
|
||||
api/application/syslogs/*
|
||||
api/application/request_logs/*
|
||||
api/application/pd_reports/*
|
||||
api/application/docs/*
|
||||
!api/application/logs/index.html
|
||||
!api/application/logs/.htaccess
|
||||
|
||||
@ -730,6 +730,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
|
||||
$pd_details['start_location'] = $pd_details['link'];
|
||||
$pd_details['pd_visit_date'] = date('Y-m-d h:m:s');
|
||||
unset($pd_details['link']);
|
||||
$string2 = str_shuffle('1234567890');
|
||||
$OTP = substr($string2,0,6);
|
||||
@ -757,7 +758,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//get satellite image blob and store it in DB
|
||||
$pd_details['satellite_image_base64_blob'] = $this->getSatelliteImage($pd_details['pd_id']);
|
||||
|
||||
//die();
|
||||
//If it is Addtional PD ,then update 'COMPLETE' status for primary and all other addtional PD's
|
||||
if($exist_pd_details[0]['is_child'] == 1)
|
||||
{
|
||||
@ -3976,7 +3977,9 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
$temp = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
|
||||
//Save Report as HTML Version with timestamp
|
||||
$file_name = APPPATH.'pd_reports/'.$pdid.'_'.date('Y-m-d-h-m-s').'.html';
|
||||
file_put_contents($file_name,$temp,LOCK_EX);
|
||||
|
||||
//PDF Gen using DOM PDF
|
||||
$pdf_doc = $this->pdfgenerator->generate($temp, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
@ -4712,25 +4715,25 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//Get Address Data
|
||||
|
||||
$address = preg_replace("/[\n\r]/","",$pdmas[0]['addressline1']);
|
||||
// $address = preg_replace("/[\n\r]/","",$pdmas[0]['addressline1']);
|
||||
|
||||
$address = $address.','.$pdmas[0]['city_name'].','.$pdmas[0]['state_name'];
|
||||
//$address = $address.','.$pdmas[0]['city_name'].','.$pdmas[0]['state_name'];
|
||||
|
||||
//Replacing space with + symbol
|
||||
$address =str_replace(' ','+',$address);
|
||||
$address =str_replace('\n','',$address);
|
||||
$address =str_replace('\r','',$address);
|
||||
$address =str_replace('\n\r','',$address);
|
||||
$address =str_replace(PHP_EOL,'',$address);
|
||||
// $address =str_replace(' ','+',$address);
|
||||
// $address =str_replace('\n','',$address);
|
||||
// $address =str_replace('\r','',$address);
|
||||
// $address =str_replace('\n\r','',$address);
|
||||
// $address =str_replace(PHP_EOL,'',$address);
|
||||
$geo_location = $pdmas[0]['start_location'];
|
||||
$google_map_static_api_key = GOOGLE_STATIC_MAP_API_KEY;
|
||||
|
||||
|
||||
//Replacing Place holders
|
||||
$satellite_script = str_replace('{{ADDRESS}}',$address,$satellite_script);
|
||||
$satellite_script = str_replace('{{ADDRESS}}',$geo_location,$satellite_script);
|
||||
$satellite_script = str_replace('{{GEOLOCATION}}',$geo_location,$satellite_script);
|
||||
$satellite_script = str_replace('{{API_KEY}}',$google_map_static_api_key,$satellite_script);
|
||||
|
||||
//echo $satellite_script;die();
|
||||
|
||||
file_put_contents(APPPATH.'/views/js/phantomsatellite.js',$satellite_script);
|
||||
|
||||
@ -4747,17 +4750,26 @@ class PD_Controller extends REST_Controller {
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($satellite_img_content);
|
||||
|
||||
//generate log
|
||||
$logger->info("Generate Satellite Called in (".ENVIRONMENT.")",array('Address' => $address,'script' => $satellite_script,'script_output' => $ou));
|
||||
$logger->info("Generate Satellite Called in (".ENVIRONMENT.")",array('script' => $satellite_script,'script_output' => $ou));
|
||||
return $base64_pdscore_chart_url;
|
||||
|
||||
}
|
||||
|
||||
function getDetailedScoreCardChart($score)
|
||||
{
|
||||
$business_score['business'] = $score['business'];
|
||||
|
||||
$general_score['general'] = $score['general'];
|
||||
$logger = MYLOG::logFunction();
|
||||
{
|
||||
|
||||
$business_score['business'] = array_reverse($score['business']);
|
||||
$general_score['general'] = array_reverse($score['general']);
|
||||
$logger = MYLOG::logFunction();
|
||||
//print_r($business_score['business']);die();
|
||||
foreach($business_score['business'] as $bsk => $score)
|
||||
{
|
||||
if((!($bsk == 'cerificates')) && (!strcasecmp($score['answer'],'not applicable')))
|
||||
{
|
||||
unset($business_score['business'][$bsk]);
|
||||
}
|
||||
}
|
||||
$business_score['business'] = array_reverse($business_score['business']);
|
||||
// print_r($general_score['general']);die();
|
||||
|
||||
$data = array();
|
||||
@ -4807,11 +4819,12 @@ class PD_Controller extends REST_Controller {
|
||||
else if($i == 2){ $data['base64_dsc_general'] = $base64_dsc_url; }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$logger->error('SCORE CARD SCRIPT NOT FOUND');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$logger->error('SCORE CARD SCRIPT NOT FOUND');
|
||||
}
|
||||
|
||||
// print_r($data);
|
||||
// die();
|
||||
return $data;
|
||||
@ -4844,6 +4857,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function codeigniterViewTest_post()
|
||||
{
|
||||
|
||||
//echo MYUTIL::customIndianNumberFormat(145263.45896);die();
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
$is_regenerate = 0;
|
||||
@ -4853,21 +4867,22 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
//print_r($records);
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
//print_r($data['pd_score']);
|
||||
//die();
|
||||
// print_r($data['pd_score']);
|
||||
// die();
|
||||
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
|
||||
// print_r($data['assessed_income_details']);
|
||||
// echo "**************************";
|
||||
$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
// $data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
|
||||
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
|
||||
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0;
|
||||
//echo $score_for_chart;
|
||||
$chart = 1;
|
||||
$chart = null;
|
||||
if($chart)
|
||||
{
|
||||
//GET phantom script from DB
|
||||
@ -4904,12 +4919,21 @@ class PD_Controller extends REST_Controller {
|
||||
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
|
||||
|
||||
$data['pd_processed_forms'][$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
|
||||
|
||||
$fields2 = array('*');
|
||||
$data['pd_images'][$i] = $this->PD_Model->getSignedPDDocsURL($pdid,$i);
|
||||
|
||||
|
||||
// $this->getPDImages_post($fields2,array('fk_pd_id'=>$pdid,'fk_form_id' => $i),PDDOCUMENTS,array(),'','company_id','ASC');
|
||||
// print_r($this->db->last_query());
|
||||
}
|
||||
|
||||
//die();
|
||||
//print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true));
|
||||
//die();
|
||||
//echo "*******************************************";
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
$file_name = APPPATH.'pd_reports/'.$pdid.'_'.date('Y-m-d-h-m-s').'.html';
|
||||
//file_put_contents($file_name,$t,LOCK_EX);
|
||||
//echo $t; die();
|
||||
//PDF Gen using DOM PDF
|
||||
$pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
@ -5355,19 +5379,14 @@ class PD_Controller extends REST_Controller {
|
||||
//print_r($json);die();
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
|
||||
foreach($json['persons_with_relationships'] as $key => $relation)
|
||||
foreach($json['persons_with_relationships'] as $key => $relation)
|
||||
{
|
||||
foreach($json['individuals'] as $ind)
|
||||
{
|
||||
// if($relation['pd_co_applicant_id'] == $ind['pd_co_applicant_id'])
|
||||
// {
|
||||
// $relation['age'] = $ind['age'];
|
||||
// }
|
||||
//else
|
||||
if($relation['applicant_name'] == $ind['applicant_name'])
|
||||
{
|
||||
$relation['age'] = $ind['age'];
|
||||
$relation['applicant_title_name'] = $ind['applicant_title_name'];
|
||||
}
|
||||
|
||||
}
|
||||
@ -5873,6 +5892,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function saveBase64Images($pd_id,$form_id = null,$company_id = null,$data)
|
||||
{
|
||||
|
||||
|
||||
$count = 0;
|
||||
$result = array();
|
||||
$pd_details = $this->PD_Model->getPDMasterDetails($pd_id);
|
||||
@ -5923,12 +5943,14 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
if($count == count($data))
|
||||
{
|
||||
//$logger->info('All Images Saved Sucessfully',array($pd_id,$form_id,$company_id));
|
||||
$result['status'] = true;
|
||||
$result['count'] = $count;
|
||||
$result['msg'] = "All Images Saved Successfully";
|
||||
}
|
||||
else
|
||||
{
|
||||
//$logger->info('Some Images Not Saved',array($pd_id,$form_id,$company_id));
|
||||
$result['status'] = true;
|
||||
$result['count'] = $count;
|
||||
$result['msg'] = "Some Images Not Saved!";
|
||||
@ -6099,7 +6121,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
#####Business Form Questions########
|
||||
$business_form = (json_decode($form_data[13][0]['processed_json'],true));
|
||||
//print_r($business_form);
|
||||
//print_r($business_form);die();
|
||||
|
||||
// 10 - QNO(1.6) - was_the_company_name_board_sighted
|
||||
$score_questions['general']['was_the_company_name_board_sighted'] = isset($business_form['was_the_company_name_board_sighted']) ? $business_form['was_the_company_name_board_sighted'] : 'No';
|
||||
@ -6127,10 +6149,18 @@ class PD_Controller extends REST_Controller {
|
||||
#####Business Assets Form Questions########
|
||||
$business_assest_form = (json_decode($form_data[22][0]['processed_json'],true));
|
||||
//print_r($business_assest_form);die();
|
||||
|
||||
$property_count = 0;
|
||||
$vechile_count = 0;
|
||||
|
||||
if(array_key_exists('business_assets_for_address',$business_assest_form) && isset($business_assest_form['business_assets_for_address'][0]))
|
||||
{
|
||||
$property_count = (!strcasecmp($business_assest_form['business_assets_for_address'][0]['business_ownership_type'],'owned')) ? (++$property_count) : $property_count;
|
||||
}
|
||||
//die();
|
||||
if(array_key_exists('business_assets_details',$business_assest_form))
|
||||
{
|
||||
$property_count = 0;
|
||||
$vechile_count = 0;
|
||||
|
||||
foreach($business_assest_form['business_assets_details'] as $value)
|
||||
{
|
||||
if($value['business_assets_mode'] == 2)
|
||||
@ -6142,7 +6172,7 @@ class PD_Controller extends REST_Controller {
|
||||
$vechile_count++;
|
||||
}
|
||||
}
|
||||
|
||||
//echo
|
||||
// 14 - QNO(2.5) - owned_property
|
||||
$score_questions['business']['owned_property'] = $property_count ? 'yes':'no';
|
||||
// 15 - QNO(2.6) - owned_vechile
|
||||
@ -6155,17 +6185,19 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
#####supplier Form Questions########
|
||||
$supplier_form = isset($form_data[1][0]['processed_json'])?(json_decode($form_data[1][0]['processed_json'],true)):array();
|
||||
//print_r($supplier_form);
|
||||
//print_r($supplier_form);die();
|
||||
if(!((count($business_form['select_business_activity_type']) == 1) && ($business_form['select_business_activity_type'][0]['type_of_activity_id'] == 5)))
|
||||
{
|
||||
if(count($supplier_form))
|
||||
{
|
||||
|
||||
$supplier_count = 0;
|
||||
if(array_key_exists('manufacturing_details',$supplier_form))
|
||||
{
|
||||
if(isset($client_form['manufacturing_details'][0]['main_raw_materials']))
|
||||
if(isset($supplier_form['manufacturing_details'][0]['main_raw_materials']))
|
||||
{
|
||||
|
||||
$supplier_count += count($client_form['manufacturing_details'][0]['main_raw_materials']) ? count($client_form['manufacturing_details'][0]['main_raw_materials']) : 0;
|
||||
$supplier_count += count($supplier_form['manufacturing_details'][0]['main_raw_materials']) ? count($supplier_form['manufacturing_details'][0]['main_raw_materials']) : 0;
|
||||
|
||||
|
||||
}
|
||||
@ -6175,10 +6207,10 @@ class PD_Controller extends REST_Controller {
|
||||
if(array_key_exists('trade_details',$supplier_form))
|
||||
{
|
||||
|
||||
if(isset($client_form['trade_details'][0]['trading_products']))
|
||||
if(isset($supplier_form['trade_details'][0]['trading_products']))
|
||||
{
|
||||
|
||||
$supplier_count += count($client_form['trade_details'][0]['trading_products']) ? count($client_form['trade_details'][0]['trading_products']): 0;
|
||||
$supplier_count += count($supplier_form['trade_details'][0]['trading_products']) ? count($supplier_form['trade_details'][0]['trading_products']): 0;
|
||||
|
||||
}
|
||||
//echo 'IN trade-'.$supplier_count;
|
||||
@ -6192,6 +6224,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$score_questions['business']['minimum_supplier_info'] = 'Not Applicable';
|
||||
}
|
||||
}else { $score_questions['business']['minimum_supplier_info'] = 'Not Applicable'; }
|
||||
|
||||
//echo $score_questions['business']['minimum_supplier_info'];die();
|
||||
#####End of supplier Form Questions########
|
||||
@ -6314,8 +6347,9 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$score_questions['business']['vintage_of_business_account'] = count($vintage)? max($vintage) : 0;
|
||||
//echo $vintage_of_business_account_for_display;
|
||||
//$score_questions['business']['vintage_of_business_account_for_display'] = $vintage_of_business_account_for_display;
|
||||
######End of Business Banking ##############
|
||||
return $score_questions;
|
||||
|
||||
|
||||
Binary file not shown.
@ -3,70 +3,104 @@
|
||||
class AssessedIncome
|
||||
{
|
||||
|
||||
public static function getSummaryTable($ai_summary_details){
|
||||
public static function getSummaryTable($ai_summary_details,$ai_core_details){
|
||||
//echo "getSummaryTable";
|
||||
//print_r($ai_summary_details);
|
||||
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$ai_table_header_row = '<tr> <th>Summary</th>';
|
||||
$sale_revenue_row = '<tr> <td>a. Sales / Revenue </td>';
|
||||
$purchase_row = '<tr> <td>b. Purchases </td>';
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
$purchase_row = '<tr> <td>b. Cost of goods sold </td>';
|
||||
}
|
||||
$gross_profit_loss_row = '<tr> <td>c. Gross Profit / Loss(a-b)</td>';
|
||||
$business_expense_row = '<tr> <td>d. Business Expenses </td>';
|
||||
$net_profit_loss_row = '<tr> <td>e. Net Profit / Loss(c-d) </td>';
|
||||
$house_hold_expense_row = '<tr> <td>f. Household Expenses </td>';
|
||||
$disposable_income_row = '<tr> <td>g. Disposable Income</td>';
|
||||
$net_margin_row = '<tr> <td>h. Net Margin % </td>';
|
||||
$considered_sales_revenue_row = '<tr> <td>Considered Sales / Revenue </td>';
|
||||
$considered_net_profit_row = '<tr> <td>Considered Net Profit </td>';
|
||||
$considered_net_margint_row = '<tr> <td>Considered Net Margin %</td>';
|
||||
$considered_sales_revenue_row = '<tr> <td>a) Considered Sales / Revenue ( Average) </td>';
|
||||
$considered_net_profit_row = '<tr> <td>b) Considered Net Profit ( Average)</td>';
|
||||
$considered_net_margint_row = '<tr> <td>c) Considered Net Margin % ((b/a) * 100 )</td>';
|
||||
$house_hold_expense_count = 0;
|
||||
|
||||
if(isset($ai_summary_details['sales_declared_by_customer']) && count($ai_summary_details['sales_declared_by_customer']))
|
||||
{
|
||||
$house_hold_expense_count = $ai_summary_details['sales_declared_by_customer']['house_hold_expenses'] != 0 ? $house_hold_expense_count : ++$house_hold_expense_count;
|
||||
|
||||
$ai_table_header_row .= '<th>Declared by Customer</th>';
|
||||
|
||||
$sale_revenue_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['sales_revenue']).'</td>';
|
||||
$purchase_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['purchases']).'</td>';
|
||||
$gross_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['disposable_income']).'</td>';
|
||||
$sale_revenue_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['sales_revenue']).'</td>';
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['purchases']).'</td>';
|
||||
}else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['cost_of_goods_sold']).'</td>';
|
||||
}
|
||||
|
||||
|
||||
$gross_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['disposable_income']).'</td>';
|
||||
$net_margin_row .= '<td>'.($ai_summary_details['sales_declared_by_customer']['netmargin']).'%</td>';
|
||||
|
||||
}
|
||||
|
||||
if(isset($ai_summary_details['sales_calculated_by_itemwise']) && count($ai_summary_details['sales_calculated_by_itemwise']))
|
||||
{
|
||||
|
||||
$house_hold_expense_count = $ai_summary_details['sales_calculated_by_itemwise']['house_hold_expenses'] != 0 ? $house_hold_expense_count : ++$house_hold_expense_count;
|
||||
|
||||
$ai_table_header_row .= '<th>As Derived from Item Wise Sales</th>';
|
||||
|
||||
$sale_revenue_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['sales_revenue']).'</td>';
|
||||
$purchase_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['purchases']).'</td>';
|
||||
$gross_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['disposable_income']).'</td>';
|
||||
$sale_revenue_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['sales_revenue']).'</td>';
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['purchases']).'</td>';
|
||||
}else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['cost_of_goods_sold']).'</td>';
|
||||
}
|
||||
$gross_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['disposable_income']).'</td>';
|
||||
$net_margin_row .= '<td>'.($ai_summary_details['sales_calculated_by_itemwise']['netmargin']).'%</td>';
|
||||
}
|
||||
|
||||
if(isset($ai_summary_details['sales_calculated_by_monthwise']) && count($ai_summary_details['sales_calculated_by_monthwise']))
|
||||
{
|
||||
|
||||
$house_hold_expense_count = $ai_summary_details['sales_calculated_by_monthwise']['house_hold_expenses'] != 0 ? $house_hold_expense_count : ++$house_hold_expense_count;
|
||||
|
||||
$ai_table_header_row .= '<th>As Derived from Kuchha Sales Book/Bills</th>';
|
||||
|
||||
$sale_revenue_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['sales_revenue']).'</td>';
|
||||
$purchase_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['purchases']).'</td>';
|
||||
$gross_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['disposable_income']).'</td>';
|
||||
$sale_revenue_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['sales_revenue']).'</td>';
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['purchases']).'</td>';
|
||||
}
|
||||
else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
$purchase_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['cost_of_goods_sold']).'</td>';
|
||||
}
|
||||
$gross_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['grossprofit']).'</td>';
|
||||
$business_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['business_expenses']).'</td>';
|
||||
$net_profit_loss_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['netprofit']).'</td>';
|
||||
$house_hold_expense_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['house_hold_expenses']).'</td>';
|
||||
$disposable_income_row .= '<td>'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['disposable_income']).'</td>';
|
||||
$net_margin_row .= '<td>'.($ai_summary_details['sales_calculated_by_monthwise']['netmargin']).'%</td>';
|
||||
}
|
||||
|
||||
if(isset($ai_summary_details['consolidated_report']) && count($ai_summary_details['consolidated_report']))
|
||||
{
|
||||
$considered_sales_revenue_row .= '<td colsapn="3">'.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_sales_revenue']).'</td>';
|
||||
$considered_net_profit_row .= '<td colsapn="3">'.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_nerprofit']).'</td>';
|
||||
$considered_sales_revenue_row .= '<td colsapn="3">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_sales_revenue']).'</td>';
|
||||
$considered_net_profit_row .= '<td colsapn="3">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_nerprofit']).'</td>';
|
||||
$considered_net_margint_row .= '<td colsapn="3">'.$ai_summary_details['consolidated_report']['consolidated_nermagin'].'%</td>';
|
||||
|
||||
}
|
||||
@ -95,6 +129,8 @@ class AssessedIncome
|
||||
// echo $considered_sales_revenue_row;
|
||||
// echo $considered_net_profit_row;
|
||||
// echo $considered_net_margint_row;
|
||||
if($house_hold_expense_count != 0){ $house_hold_expense_row = '';$disposable_income_row = '';
|
||||
$net_margin_row = substr_replace($net_margin_row,'f.',strpos($net_margin_row, 'h.'),2);}
|
||||
return array('ai_table_header_row' => $ai_table_header_row,'sale_revenue_row' => $sale_revenue_row,'purchase_row' => $purchase_row,'gross_profit_loss_row' => $gross_profit_loss_row,'business_expense_row' => $business_expense_row,'net_profit_loss_row' => $net_profit_loss_row,'house_hold_expense_row' => $house_hold_expense_row,'disposable_income_row'=>$disposable_income_row,'net_margin_row' => $net_margin_row,'considered_sales_revenue_row' => $considered_sales_revenue_row,'considered_net_profit_row' => $considered_net_profit_row,'considered_net_margint_row' =>$considered_net_margint_row);
|
||||
|
||||
|
||||
@ -107,6 +143,7 @@ class AssessedIncome
|
||||
$sales_item_wise_to_diaplay = array();
|
||||
$business_expenses_to_diaplay = array();
|
||||
$household_expenses_to_diaplay = array();
|
||||
$sales_month_wise_to_display = array();
|
||||
$sales_item_wise_header_row = '';
|
||||
// Get Purchase Informations
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
|
||||
@ -163,7 +200,7 @@ class AssessedIncome
|
||||
if(count($ai_core_details['sales_calculated_by_itemwise']))
|
||||
{
|
||||
$sales_item_wise_to_diaplay = array();
|
||||
$sales_item_wise_header_row = "<tr> <th>Product/Services</th> <th>Sale Quantitys</th> <th>UOM</th> <th>Rate/Unit or Value of Sale</th> <th>Frequency</th> <th>Annual Sales (Rs)</th>";
|
||||
$sales_item_wise_header_row = "<tr> <th>Product/Services</th> <th>Sale Qty</th> <th>UOM</th> <th>Rate/Unit or Value of Sale</th> <th>Frequency</th> <th>Annual Sales</th>";
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
$sales_item_wise_header_row .= "<th>Gross Margin %</th><th>Margin Amount</th><th>Gross Profit</th>";
|
||||
@ -192,7 +229,7 @@ class AssessedIncome
|
||||
|
||||
if(count($ai_core_details['sales_items_by_monthwise']))
|
||||
{
|
||||
$sales_month_wise_to_display = array();
|
||||
|
||||
|
||||
foreach($ai_core_details['sales_items_by_monthwise'] as $simwk => $sale_item)
|
||||
{
|
||||
|
||||
@ -91,11 +91,15 @@ public static function getOthersAssetsDetails($values){
|
||||
$storeValue['approximate_market_value'] = $fetchVal['approximate_market_value'];
|
||||
$storeValue['assets_mode'] .= '<br>('.$fetchVal['details'][0]['property_type_master'].')';
|
||||
|
||||
$storeValue['about_assets'] = $fetchVal['details'][0]['address_of_the_property']? 'Address of Property : ' . $fetchVal['details'][0]['address_of_the_property'].'.' : '';
|
||||
|
||||
$storeValue['about_assets'] .= $fetchVal['details'][0]['describe_of_the_property_asset']? '<br> Description of Asset : ' . $fetchVal['details'][0]['describe_of_the_property_asset'].'.' : '';
|
||||
$storeValue['about_assets'] = $fetchVal['details'][0]['property_type_master'] . ' property ( '. $fetchVal['details'][0]['describe_of_the_property_asset'] .' ) at '.$fetchVal['details'][0]['address_of_the_property'].' having area of '. $fetchVal['details'][0]['area_covered_by_this_property'];
|
||||
|
||||
$storeValue['about_assets'] .= $fetchVal['details'][0]['area_covered_by_this_property']? '<br> Area of Covered : ' . $fetchVal['details'][0]['area_covered_by_this_property'].'.' : '';
|
||||
$storeValue['about_assets'] .= $fetchVal['details'][0]['uom_of_the_property'] == 1 ? ' '.$fetchVal['details'][0]['uom_of_the_property'].'.' : ' '.$fetchVal['details'][0]['uom_master'].'.';
|
||||
|
||||
//$fetchVal['details'][0]['address_of_the_property']? 'Address of Property : ' . $fetchVal['details'][0]['address_of_the_property'].'.' : '';
|
||||
|
||||
//$storeValue['about_assets'] .= $fetchVal['details'][0]['describe_of_the_property_asset']? '<br> Description of Asset : ' . $fetchVal['details'][0]['describe_of_the_property_asset'].'.' : '';
|
||||
|
||||
//$storeValue['about_assets'] .= $fetchVal['details'][0]['area_covered_by_this_property']? '<br> Area of Covered : ' . $fetchVal['details'][0]['area_covered_by_this_property'].'.' : '';
|
||||
}
|
||||
//this is for other
|
||||
else if($fetchVal['assets_mode']==1){
|
||||
|
||||
@ -16,7 +16,7 @@ public static function getBusinessBankingDetails($values){
|
||||
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : $tag['applicant_name']['name'],
|
||||
'bank_name' => $tag['bank_name'] ==1 ? $tag['other_bank'] : $tag['bank_name_master'],
|
||||
'account_type' => $tag['account_type_master'],
|
||||
'main_business' => $tag['salary'],
|
||||
'main_business' => $tag['is_main'],
|
||||
'od_cc_limit' => ($tag['account_type']==3) ? $tag['limit'] : (($tag['account_type']==4) ? $tag['limit'] : 'NA'),
|
||||
'vintage' => $count_vintage,
|
||||
);
|
||||
|
||||
@ -28,18 +28,29 @@ public static function getPartnerDetails($values){
|
||||
}
|
||||
//get family members details
|
||||
public static function getFamilyMemberDetails($values){
|
||||
//print_r($values);die();
|
||||
$getFamilyMembers=array();
|
||||
foreach($values as $parRow){
|
||||
$getFamilyMembers = array_map(function($tag) {
|
||||
return array(
|
||||
'name' => $tag['family_member_salutation_master'].' '.$tag['family_member_name'],
|
||||
'individual_relation' => $tag['other_family_relationship_id_master'] .' of ',
|
||||
'relation_to' => $tag['relation_to_id_master'],
|
||||
'relation_to_company' => substr($tag['relationship_with_company_id_master'],0,-2),
|
||||
'started_business' => $tag['started_business'],
|
||||
if($parRow['family_member_name'] != "" || $parRow['family_member_name'] != null)
|
||||
{
|
||||
$temp_family = array('name' => $parRow['family_member_salutation_master'].' '.$parRow['family_member_name'],'individual_relation' => $parRow['other_family_relationship_id_master'] .' of ','relation_to' => $parRow['relation_to_id_master'],'relation_to_company' => substr($parRow['relationship_with_company_id_master'],0,-2),'started_business' => $parRow['started_business']);
|
||||
|
||||
array_push($getFamilyMembers,$temp_family);
|
||||
}
|
||||
|
||||
// $getFamilyMembers = array_map(function($tag) {
|
||||
// if($tag['family_member_name'] != "" || $tag['family_member_name'] != null)
|
||||
// {
|
||||
// return array(
|
||||
// 'name' => $tag['family_member_salutation_master'].' '.$tag['family_member_name'],
|
||||
// 'individual_relation' => $tag['other_family_relationship_id_master'] .' of ',
|
||||
// 'relation_to' => $tag['relation_to_id_master'],
|
||||
// 'relation_to_company' => substr($tag['relationship_with_company_id_master'],0,-2),
|
||||
// 'started_business' => $tag['started_business'],
|
||||
|
||||
);
|
||||
}, $values);
|
||||
// );
|
||||
// }
|
||||
// }, $values);
|
||||
}
|
||||
return $getFamilyMembers;
|
||||
}
|
||||
|
||||
@ -5,13 +5,13 @@ class Financialform
|
||||
//other loan obligations
|
||||
public static function getOtherLoanDetails($values){
|
||||
|
||||
|
||||
$rupee_symbol = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px">₹</span>';
|
||||
$first_row = '<tr><td class="customtd">Loan Type</td>';
|
||||
$second_row = '<tr><td class="customtd">Loan Amount (Rs)</td>';
|
||||
$second_row = '<tr><td class="customtd">Loan Amount</td>';
|
||||
// $third_row = '<tr><td class="customtd">Loan Amount (Rs)</td>';
|
||||
$fourth_row = '<tr><td class="customtd">Availed From</td>';
|
||||
$fifth_row = '<tr><td class="customtd">Borrower</td>';
|
||||
$sixth_row = '<tr><td class="customtd">Instalment Amount (Rs)</td>';
|
||||
$sixth_row = '<tr><td class="customtd">Instalment Amount</td>';
|
||||
$seventh_row = '<tr><td class="customtd">Instalment Frequency</td>';
|
||||
$eigth_row = '<tr><td class="customtd">Original Tenure (Months)</td>';
|
||||
$ninth_row = '<tr><td class="customtd">Elapsed Tenure (Months)</td>';
|
||||
@ -46,13 +46,13 @@ public static function getOtherLoanDetails($values){
|
||||
$setFrequencyType = ' per';
|
||||
|
||||
}
|
||||
$loanTaken=$tag['loan_taken_by'];
|
||||
$loanTaken=$tag['loan_taken_by'][0];
|
||||
|
||||
|
||||
|
||||
$first_row .= $tag['loan_type']==1 ? '<td class="customtd">'.$tag['others_loan_type'].'</td>' : '<td class="customtd">'.$tag['loan_type_master'] .'</td>';
|
||||
|
||||
$second_row .= '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
$second_row .= '<td class="customtd">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
|
||||
//$third_row = '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
|
||||
@ -60,7 +60,7 @@ public static function getOtherLoanDetails($values){
|
||||
|
||||
$fifth_row .= $loanTaken['id']==0 ? '<td class="customtd">'.$tag['others_loan_taken'].'</td>' : '<td class="customtd">'.$loanTaken['name'].'</td>';
|
||||
|
||||
$sixth_row .= '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['emi']).'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['emi']).'</td>';
|
||||
|
||||
$seventh_row .= $tag['frequency']==1 ? '<td class="customtd">'.$tag['other_frequency'].'</td>' : '<td class="customtd">'.$tag['frequency_master'].'</td>';
|
||||
|
||||
@ -84,10 +84,10 @@ public static function getBusinessFinancialDetails($values){
|
||||
|
||||
return array(
|
||||
'financial_year' => $tag['financial_year'],
|
||||
'financial_sales_revenue' => 'Rs.'.$tag['financial_annual_sale'],
|
||||
'financial_sales_revenue' => $tag['financial_annual_sale'],
|
||||
'financial_net_profit_mode' => $tag['finanical_profit_or_loss']==1 ? 1 : 0,
|
||||
'financial_net_profit' => $tag['finanical_profit_or_loss']==1 ? 'Rs.'.$tag['financial_net_profit'] : '',
|
||||
'financial_net_loss' => $tag['finanical_profit_or_loss']!=1 ? 'Rs.'.$tag['financial_net_loss'] : '',
|
||||
'financial_net_profit' => $tag['finanical_profit_or_loss']==1 ? $tag['financial_net_profit'] : '',
|
||||
'financial_net_loss' => $tag['finanical_profit_or_loss']!=1 ? $tag['financial_net_loss'] : '',
|
||||
'financial_margin_of_profit' => $tag['finanical_profit_or_loss']==1 ? $tag['financial_margin_of_profit'] : '',
|
||||
'financial_margin_of_loss' => $tag['finanical_profit_or_loss']!=1 ? $tag['financial_margin_of_loss'] : '',
|
||||
'profit_variation' => $tag['financial_variation'],
|
||||
@ -133,7 +133,7 @@ public static function getBusinessCustomerFinancialDetails($values) {
|
||||
else if($tag['estimate_profit_or_loss']==2){
|
||||
return array(
|
||||
'estimate_profit_or_loss' => $tag['estimate_profit_or_loss'],
|
||||
'estimate_sales_average' => 'Rs.'.$tag['estimate_sales_average'],
|
||||
'estimate_sales_average' => $tag['estimate_sales_average'],
|
||||
'estimate_sales_from' =>$tag['estimate_sales_from'],
|
||||
'estimate_sales_to' => $tag['estimate_sales_to'],
|
||||
'estimate_net_margin_availablity' => $tag['estimate_net_margin_availablity'],
|
||||
|
||||
@ -649,7 +649,7 @@ class GETPROCESSEDJSON
|
||||
$where_condition_array = array('fk_form_id' => $formid,'isactive' => 1);
|
||||
$master_keys = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,QUESTIONKEYMAPPING);
|
||||
|
||||
//print_r($master_keys);
|
||||
//print_r($master_keys);die();
|
||||
if(!empty($raw_json) && !empty($master_keys))
|
||||
{
|
||||
|
||||
@ -1701,6 +1701,19 @@ class GETPROCESSEDJSON
|
||||
{
|
||||
$raw_json['assets_details'][$assets_detail_key]['details'][0]['property_type_master'] = $assest_mode_name[0][$master_tables_field_names['PROPERTIES']];
|
||||
}
|
||||
//UOM
|
||||
$CI->db->SELECT( $master_tables_field_names['UOM'] );
|
||||
$CI->db->FROM(UOM);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE( $master_tables_pkid['UOM'] ,$assets_detail['details'][0]['uom_of_the_property']);
|
||||
$uom_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($uom_name))
|
||||
{
|
||||
$raw_json['assets_details'][$assets_detail_key]['details'][0]['uom_master'] = $uom_name[0][$master_tables_field_names['UOM']];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($assets_detail['assets_mode'] == 3)
|
||||
|
||||
@ -15,7 +15,7 @@ class MYUTIL
|
||||
$digits_1 = strlen($no);
|
||||
$i = 0;
|
||||
$str = array();
|
||||
$words = array('0' => 'zero', '1' => 'One', '2' => 'Two',
|
||||
$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',
|
||||
@ -50,9 +50,9 @@ class MYUTIL
|
||||
$res = $result;
|
||||
if($points != "")
|
||||
{
|
||||
$res.=$points . " Paise";
|
||||
$res.=$points . "";
|
||||
}
|
||||
return $result.' Only';
|
||||
return $result.' rupees Only';
|
||||
|
||||
}
|
||||
|
||||
@ -147,9 +147,10 @@ class MYUTIL
|
||||
|
||||
public static function customIndianNumberFormat($value)
|
||||
{
|
||||
$indian_num_format = numfmt_create( 'en_IN', NumberFormatter::CURRENCY );
|
||||
$indian_num_format = numfmt_create( 'en_IN', NumberFormatter::DECIMAL );
|
||||
//echo numfmt_format_currency($indian_num_format,$value, "INR");
|
||||
return numfmt_format_currency($indian_num_format,$value, "INR");
|
||||
//return numfmt_format_currency($indian_num_format,$value,"INR");
|
||||
return numfmt_format($indian_num_format,$value);
|
||||
}
|
||||
|
||||
public static function applicantNameCamelCaseConvertion($name)
|
||||
|
||||
@ -13,7 +13,7 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
|
||||
|
||||
if(strtoupper($tag['do_know'])=='YES'){
|
||||
|
||||
$neighbourhood_do_know = $tag['neighbourhood_name']." knows about applicant and their business.";
|
||||
$neighbourhood_do_know = $tag['neighbourhood_name']." knows about applicants and their business.";
|
||||
} else if(strtoupper($tag['do_know'])=='NO'){
|
||||
$neighbourhood_do_know = $tag['neighbourhood_name']." did not know about the applicant or their business.";
|
||||
}
|
||||
@ -37,16 +37,28 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
|
||||
if($owner['id'] != 0)
|
||||
{
|
||||
$ownwers_list .= $owner['name'].',';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$ownwers_list .= ' '.$tag['other_organisation_owner'];
|
||||
$ownwers_list .= ' '.$tag['other_organisation_owner'].',';
|
||||
}
|
||||
}
|
||||
$ownwers_list = substr_replace($ownwers_list, ' and', strrpos($ownwers_list, ','),1);
|
||||
$grammer1 = count($tag['organisation_owner']) > 0 ? ' are': ' is';
|
||||
$grammer2 = count($tag['organisation_owner']) > 0 ? 'owners': 'owner';
|
||||
|
||||
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
|
||||
if(count($tag['organisation_owner']) == 1)
|
||||
{
|
||||
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
|
||||
}else if($tag['organisation_owner'] > 1)
|
||||
{
|
||||
$ownwers_list = substr_replace($ownwers_list,' and ', strrpos($ownwers_list,','),1);
|
||||
}
|
||||
|
||||
|
||||
$grammer1 = count($tag['organisation_owner']) > 1 ? ' are': ' is ';
|
||||
$grammer2 = count($tag['organisation_owner']) > 1 ? 'owners': 'owner';
|
||||
$ownership = 'As per '.$tag['neighbourhood_name'].' the '.$grammer2 .' of '.$company_name.$grammer1.$ownwers_list.'.';
|
||||
|
||||
}else
|
||||
{
|
||||
$ownership = $tag['neighbourhood_name']." was not aware of the business ownership.";
|
||||
|
||||
@ -4,6 +4,7 @@ class Otherfamilyform
|
||||
{
|
||||
public static function getFamilyDetails($values){
|
||||
$mergeResult=array();
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
foreach($values as $fetchVal){
|
||||
//print_r($fetchVal);die();
|
||||
$storeValue=array();
|
||||
@ -19,8 +20,8 @@ public static function getFamilyDetails($values){
|
||||
$getFamilyEarning='';
|
||||
if($tag['family_member_earning_status']==1){
|
||||
$getFamilyEarning= 'Earning ';
|
||||
$getFamilyOccupation = $tag['earning_segment']==1 ? $tag['earning_if_others_segment'].' Income of '.$tag['earning_gross_income_per_month'].' per month. ':' Income of '.$tag['earning_gross_income_per_month'].' per month.';
|
||||
$getFamilyOccupation .= $tag['earning_name_of_the_employer_or_business'] ? ' with '.$tag['earning_name_of_the_employer_or_business'].'.' : '';
|
||||
$getFamilyOccupation = $tag['earning_segment']==1 ? $tag['earning_if_others_segment'].' Income of '.$tag['earning_gross_income_per_month'].' per month. ':' Income of '.'<span style="font-family: DejaVu Sans; sans-serif;font-size:10px">₹</span>'.MYUTIL::customIndianNumberFormat($tag['earning_gross_income_per_month']).' per month.';
|
||||
$getFamilyOccupation .= $tag['earning_name_of_the_employer_or_business'] ? ' received from '.$tag['earning_name_of_the_employer_or_business'].'.' : '';
|
||||
|
||||
$getFamilyOccupation .= 'He has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' years.';
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class PDSCORE
|
||||
/*-------- BUSNIESS --------------*/
|
||||
$no_of_years_business_run = array('100> to >=10' => 10,'5<= to <10' => 8,'3<= to <5' => 6,'1<= to <3' => 4,' 1> to >0' => 2);
|
||||
$business_seasonality = array('yes' => 5, 'no major changes in sales' => 10);
|
||||
$employees_total = array('1000> to >50' => 10,'21<= to <50' => 8, '11<= to <20' => 6, '6<= to <10' =>4,'5>= to >0' => 2) ;
|
||||
$employees_total = array('1000> to >=50' => 10,'21<= to <50' => 8, '11<= to <=20' => 6, '6<= to <10' =>4,'5>= to >0' => 2) ;
|
||||
$cerificates = array('yes' => 10,'no' => 0, 'not applicable' => 0);
|
||||
$owned_property = array('yes' => 10, 'no' => 0);
|
||||
$owned_vechile = array('yes' => 10, 'no' => 0);
|
||||
@ -77,7 +77,7 @@ class PDSCORE
|
||||
$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);
|
||||
$location_suited_for_busienss = array('well_suited' => 10 ,'fairly_suited' => 6,'not_suited' => 0);
|
||||
$business_activity_has_seen = array('yes' => 10, 'no' => 0);
|
||||
$vintage_of_business_account = array('100> to >=10' => 10,'7<= to <10' => 8,'5<= to <7' => 6,'3<= to <5' => 4,'3> to >0' => 2);
|
||||
/*-------- FINAL --------------*/
|
||||
@ -267,22 +267,25 @@ class PDSCORE
|
||||
|
||||
$business_distribute_level_weightage = 0;
|
||||
|
||||
|
||||
//echo $score_questions['business']['minimum_supplier_info'];die();
|
||||
if(!strcasecmp($score_questions['business']['minimum_supplier_info'],'Not Applicable'))
|
||||
{
|
||||
$business_distribute_level_weightage += $minimum_supplier_info_L2;
|
||||
$minimum_supplier_info_L2 = 0;
|
||||
}
|
||||
if(!strcasecmp($score_questions['business']['minimum_client_info'],'Not Applicable'))
|
||||
{
|
||||
$business_distribute_level_weightage += $minimum_client_info_L2;
|
||||
$minimum_client_info_L2 = 0;
|
||||
}
|
||||
if(!strcasecmp($score_questions['business']['stock_raw_material_enough'],'Not Applicable'))
|
||||
{
|
||||
$business_distribute_level_weightage += $stock_raw_material_enough_L2;
|
||||
$stock_raw_material_enough_L2 = 0;
|
||||
}
|
||||
if(!strcasecmp($score_questions['business']['stock_finished_goods_enough'],'Not Applicable'))
|
||||
{
|
||||
$business_distribute_level_weightage += $stock_finished_goods_enough_L2;
|
||||
$business_distribute_level_weightage += $stock_finished_goods_enough_L2;$stock_finished_goods_enough_L2 = 0;
|
||||
}
|
||||
//echo $business_distribute_level_weightage;
|
||||
|
||||
@ -441,7 +444,8 @@ class PDSCORE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// echo $score_band;
|
||||
// die();
|
||||
|
||||
|
||||
$employees_total_max_score = ($l1_business/100) * ($employees_total_L2/100) * max($employees_total);
|
||||
@ -511,7 +515,11 @@ class PDSCORE
|
||||
|
||||
$vintage_of_business_account_max_score = ($l1_business/100) * ($vintage_of_business_account_L2/100) * max($vintage_of_business_account);
|
||||
|
||||
$score_questions['business']['vintage_of_business_account'] = array('l1_weightage' => $l1_business,'l2_weightage' => ($business_activity_has_seen_L2),'answer' => $score_questions['business']['vintage_of_business_account'],'attributed_score' => ($vintage_of_business_account_actual_score), 'max_score' => ($vintage_of_business_account_max_score),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $score_band,'max_score_band' => max($vintage_of_business_account));
|
||||
|
||||
$vintage_of_business_account_for_display = explode('.',($score_questions['business']['vintage_of_business_account']));
|
||||
$vintage_of_business_account_for_display = ($vintage_of_business_account_for_display[0] != 0 ? $vintage_of_business_account_for_display[0].' Yrs ' : '') . ($vintage_of_business_account_for_display[1] != 0 ? $vintage_of_business_account_for_display[1].' Mns ' : '');
|
||||
|
||||
$score_questions['business']['vintage_of_business_account'] = array('l1_weightage' => $l1_business,'l2_weightage' => ($business_activity_has_seen_L2),'answer' => $vintage_of_business_account_for_display,'attributed_score' => ($vintage_of_business_account_actual_score), 'max_score' => ($vintage_of_business_account_max_score),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $score_band,'max_score_band' => max($vintage_of_business_account));
|
||||
/*-----------END OF BUSINESS SECTION -----------*/
|
||||
|
||||
|
||||
|
||||
@ -744,7 +744,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,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, 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,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob');
|
||||
$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,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, 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,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date');
|
||||
$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');
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$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 Shared >>", "minimum_client_info" => "Client Information Shared >>","stock_raw_material_enough" => "Sufficiency of Raw Materials Stock Observed >>", "stock_finished_goods_enough" => "Sufficiency of Finished/Traded Stock Observed >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");$descriptions = '';$score = '';if(isset($business) && count($business)){foreach($business as $key => $d){$descriptions .= '"'.$business_captions [$key].'",'; $score .= $d['attributed_score'] != 0 && $d['max_score'] != 0 ? (($d['attributed_score']/$d['max_score']) * 100).',' : '0'.',';}}
|
||||
?><html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Business PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>
|
||||
?><html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Business PD Score","font-family": "Arial","background-color": "none","font-color": "#000","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>
|
||||
@ -1,3 +1,3 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, one of the loan applicants? >>","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" => "Name Board of the Business Seen >>","value_of_other_assets" => "Value of Assets as a % of Loan Amount >>");$descriptions = '';$score = '';if(isset($general) && count($general)){foreach($general as $key => $d){$descriptions .= '"'.$general_captions [$key].'",'; $score .= $d['attributed_score'] != 0 && $d['max_score'] != 0 ? (($d['attributed_score']/$d['max_score']) * 100).',' : '0'.',';}}
|
||||
?><html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Others PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>
|
||||
?><html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Others PD Score","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>
|
||||
@ -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 = 50.94;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 = 82.3;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);});
|
||||
@ -1 +1 @@
|
||||
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Others PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["OTP authentication done >>","Is person Met, one of the loan applicants? >>","Qualification of Loan Applicants >>","Comment on Locality >>","Approach to PD location >>","Customer Behaviour >>","Neighbourhood check >>","Name Board of the Business Seen >>","Value of Assets as a % of Loan Amount >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,60,70,70,0,0,100,100,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc_general.png'); phantom.exit();};
|
||||
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Others PD Score","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["Value of Assets as a % of Loan Amount >>","Name Board of the Business Seen >>","Neighbourhood check >>","Customer Behaviour >>","Approach to PD location >>","Comment on Locality >>","Qualification of Loan Applicants >>","Is person Met, one of the loan applicants? >>","OTP authentication done >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,100,100,70,70,100,100,100,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc_general.png'); phantom.exit();};
|
||||
@ -1 +1 @@
|
||||
var page = require('webpage').create();page.viewportSize = { width: 650, height: 250 };page.clipRect = { top: 0, left: 0, width: 500, height: 250 };var score = 78;var url = 'https://maps.googleapis.com/maps/api/staticmap?center=NO.1,+NEHRU+NAGAR,+3RD+STREET,+ACHRAPAKKAM,KANCHIPURAM,Acharapakkam,Tamil+Nadu,IND&zoom=14&markers=color:red|&size=800x300&maptype=roadmap&key=AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg';var image_url ='/opt/lampp/htdocs/sparqtest/api/application/views/report_templates/satellite.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
var page = require('webpage').create();page.viewportSize = { width: 650, height: 250 };page.clipRect = { top: 0, left: 0, width: 500, height: 250 };var score = 78;var url = 'https://maps.googleapis.com/maps/api/staticmap?center=12.4002984,79.8103515,IND&zoom=14&markers=color:red|12.4002984,79.8103515&size=800x300&maptype=roadmap&key=AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg';var image_url ='/opt/lampp/htdocs/sparqtest/api/application/views/report_templates/satellite.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -34,9 +34,9 @@
|
||||
<!-- tick.plot0 = Math.ceil(350 + (Math.random() * 500)); -->
|
||||
<!-- callback(JSON.stringify(tick)); -->
|
||||
<!-- }; -->
|
||||
var currentLocation = window.location;
|
||||
var str = currentLocation;
|
||||
var arr = str.split("=");
|
||||
<!-- var currentLocation = window.location; -->
|
||||
<!-- var str = currentLocation; -->
|
||||
<!-- var arr = str.split("="); -->
|
||||
var myConfig = {
|
||||
type: "gauge",
|
||||
globals: {
|
||||
@ -113,7 +113,7 @@
|
||||
resetTimeout: 1000
|
||||
},
|
||||
series: [{
|
||||
values: [30], // starting value
|
||||
values: [82.5], // starting value
|
||||
backgroundColor: 'black',
|
||||
indicator: [10, 10, 10, 10, 0.75],
|
||||
animation: {
|
||||
|
||||
@ -3,7 +3,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
//echo $_SERVER['REQUEST_URI'];
|
||||
$score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1));
|
||||
//$score = 35.4;
|
||||
//$score = 25.3;
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<title>PDSCORE CHART</title>
|
||||
@ -55,7 +55,7 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
|
||||
valueBox: {
|
||||
placement: 'center',
|
||||
text: '%v', //default
|
||||
fontSize: 30,
|
||||
fontSize: 26,
|
||||
rules: [{
|
||||
rule: '%v >= 80',
|
||||
text: '%v<br>EXCELLENT'
|
||||
@ -72,7 +72,7 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
borderRadius: 10
|
||||
borderRadius: 20
|
||||
},
|
||||
scaleR: {
|
||||
aperture: 180,
|
||||
@ -120,7 +120,7 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
|
||||
series: [{
|
||||
values: [<?php echo $score;?>], // starting value
|
||||
backgroundColor: 'black',
|
||||
indicator: [10, 1, 20, 10, 0.24],
|
||||
indicator: [10, 1, 20, 50, 0.24],
|
||||
animation: {
|
||||
effect: 1,
|
||||
method: 1,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user