diff --git a/.gitignore b/.gitignore
index 587519b3..8e20071b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 9829fcec..e380dfd0 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -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;
diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf
index 00761ba1..2193c779 100644
Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ
diff --git a/api/application/helpers/assessedincome_helper.php b/api/application/helpers/assessedincome_helper.php
index 947898ac..e58c8ecd 100644
--- a/api/application/helpers/assessedincome_helper.php
+++ b/api/application/helpers/assessedincome_helper.php
@@ -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 = "₹ ";
$ai_table_header_row = '
Summary ';
$sale_revenue_row = ' a. Sales / Revenue ';
$purchase_row = ' b. Purchases ';
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ $purchase_row = ' b. Cost of goods sold ';
+ }
$gross_profit_loss_row = ' c. Gross Profit / Loss(a-b) ';
$business_expense_row = ' d. Business Expenses ';
$net_profit_loss_row = ' e. Net Profit / Loss(c-d) ';
$house_hold_expense_row = ' f. Household Expenses ';
$disposable_income_row = ' g. Disposable Income ';
$net_margin_row = ' h. Net Margin % ';
- $considered_sales_revenue_row = ' Considered Sales / Revenue ';
- $considered_net_profit_row = ' Considered Net Profit ';
- $considered_net_margint_row = ' Considered Net Margin % ';
+ $considered_sales_revenue_row = ' a) Considered Sales / Revenue ( Average) ';
+ $considered_net_profit_row = ' b) Considered Net Profit ( Average) ';
+ $considered_net_margint_row = ' c) Considered Net Margin % ((b/a) * 100 ) ';
+ $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 .= 'Declared by Customer ';
- $sale_revenue_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['sales_revenue']).' ';
- $purchase_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['purchases']).' ';
- $gross_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['grossprofit']).' ';
- $business_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['business_expenses']).' ';
- $net_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['netprofit']).' ';
- $house_hold_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['house_hold_expenses']).' ';
- $disposable_income_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['disposable_income']).' ';
+ $sale_revenue_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['sales_revenue']).' ';
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['purchases']).' ';
+ }else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['cost_of_goods_sold']).' ';
+ }
+
+
+ $gross_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['grossprofit']).' ';
+ $business_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['business_expenses']).' ';
+ $net_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['netprofit']).' ';
+ $house_hold_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['house_hold_expenses']).' ';
+ $disposable_income_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_declared_by_customer']['disposable_income']).' ';
$net_margin_row .= ''.($ai_summary_details['sales_declared_by_customer']['netmargin']).'% ';
}
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 .= 'As Derived from Item Wise Sales ';
- $sale_revenue_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['sales_revenue']).' ';
- $purchase_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['purchases']).' ';
- $gross_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['grossprofit']).' ';
- $business_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['business_expenses']).' ';
- $net_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['netprofit']).' ';
- $house_hold_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['house_hold_expenses']).' ';
- $disposable_income_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['disposable_income']).' ';
+ $sale_revenue_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['sales_revenue']).' ';
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['purchases']).' ';
+ }else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['cost_of_goods_sold']).' ';
+ }
+ $gross_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['grossprofit']).' ';
+ $business_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['business_expenses']).' ';
+ $net_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['netprofit']).' ';
+ $house_hold_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['house_hold_expenses']).' ';
+ $disposable_income_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_itemwise']['disposable_income']).' ';
$net_margin_row .= ''.($ai_summary_details['sales_calculated_by_itemwise']['netmargin']).'% ';
}
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 .= 'As Derived from Kuchha Sales Book/Bills ';
- $sale_revenue_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['sales_revenue']).' ';
- $purchase_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['purchases']).' ';
- $gross_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['grossprofit']).' ';
- $business_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['business_expenses']).' ';
- $net_profit_loss_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['netprofit']).' ';
- $house_hold_expense_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['house_hold_expenses']).' ';
- $disposable_income_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['disposable_income']).' ';
+ $sale_revenue_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['sales_revenue']).' ';
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['purchases']).' ';
+ }
+ else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ $purchase_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['cost_of_goods_sold']).' ';
+ }
+ $gross_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['grossprofit']).' ';
+ $business_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['business_expenses']).' ';
+ $net_profit_loss_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['netprofit']).' ';
+ $house_hold_expense_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['house_hold_expenses']).' ';
+ $disposable_income_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['sales_calculated_by_monthwise']['disposable_income']).' ';
$net_margin_row .= ''.($ai_summary_details['sales_calculated_by_monthwise']['netmargin']).'% ';
}
if(isset($ai_summary_details['consolidated_report']) && count($ai_summary_details['consolidated_report']))
{
- $considered_sales_revenue_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_sales_revenue']).' ';
- $considered_net_profit_row .= ''.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_nerprofit']).' ';
+ $considered_sales_revenue_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_sales_revenue']).' ';
+ $considered_net_profit_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_summary_details['consolidated_report']['consolidated_nerprofit']).' ';
$considered_net_margint_row .= ''.$ai_summary_details['consolidated_report']['consolidated_nermagin'].'% ';
}
@@ -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 = " Product/Services Sale Quantitys UOM Rate/Unit or Value of Sale Frequency Annual Sales (Rs) ";
+ $sales_item_wise_header_row = " Product/Services Sale Qty UOM Rate/Unit or Value of Sale Frequency Annual Sales ";
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
{
$sales_item_wise_header_row .= "Gross Margin % Margin Amount Gross Profit ";
@@ -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)
{
diff --git a/api/application/helpers/assetsform_helper.php b/api/application/helpers/assetsform_helper.php
index 4842f2d7..d3cbf1a0 100644
--- a/api/application/helpers/assetsform_helper.php
+++ b/api/application/helpers/assetsform_helper.php
@@ -91,11 +91,15 @@ public static function getOthersAssetsDetails($values){
$storeValue['approximate_market_value'] = $fetchVal['approximate_market_value'];
$storeValue['assets_mode'] .= ' ('.$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']? ' 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']? ' 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']? ' Description of Asset : ' . $fetchVal['details'][0]['describe_of_the_property_asset'].'.' : '';
+
+ //$storeValue['about_assets'] .= $fetchVal['details'][0]['area_covered_by_this_property']? ' Area of Covered : ' . $fetchVal['details'][0]['area_covered_by_this_property'].'.' : '';
}
//this is for other
else if($fetchVal['assets_mode']==1){
diff --git a/api/application/helpers/bankingform_helper.php b/api/application/helpers/bankingform_helper.php
index 312e9512..91a08dd7 100644
--- a/api/application/helpers/bankingform_helper.php
+++ b/api/application/helpers/bankingform_helper.php
@@ -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,
);
diff --git a/api/application/helpers/businessform_helper.php b/api/application/helpers/businessform_helper.php
index 56340ef4..b676de07 100644
--- a/api/application/helpers/businessform_helper.php
+++ b/api/application/helpers/businessform_helper.php
@@ -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;
}
diff --git a/api/application/helpers/financialform_helper.php b/api/application/helpers/financialform_helper.php
index 86aebeaa..fafa6dae 100644
--- a/api/application/helpers/financialform_helper.php
+++ b/api/application/helpers/financialform_helper.php
@@ -5,13 +5,13 @@ class Financialform
//other loan obligations
public static function getOtherLoanDetails($values){
-
+ $rupee_symbol = '₹ ';
$first_row = ' Loan Type ';
- $second_row = 'Loan Amount (Rs) ';
+ $second_row = 'Loan Amount ';
// $third_row = 'Loan Amount (Rs) ';
$fourth_row = 'Availed From ';
$fifth_row = 'Borrower ';
- $sixth_row = 'Instalment Amount (Rs) ';
+ $sixth_row = 'Instalment Amount ';
$seventh_row = 'Instalment Frequency ';
$eigth_row = 'Original Tenure (Months) ';
$ninth_row = 'Elapsed Tenure (Months) ';
@@ -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 ? ''.$tag['others_loan_type'].' ' : ''.$tag['loan_type_master'] .' ';
- $second_row .= ''.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' ';
+ $second_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' ';
//$third_row = ''.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' ';
@@ -60,7 +60,7 @@ public static function getOtherLoanDetails($values){
$fifth_row .= $loanTaken['id']==0 ? ''.$tag['others_loan_taken'].' ' : ''.$loanTaken['name'].' ';
- $sixth_row .= ''.MYUTIL::customIndianNumberFormat($tag['emi']).' ';
+ $sixth_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['emi']).' ';
$seventh_row .= $tag['frequency']==1 ? ''.$tag['other_frequency'].' ' : ''.$tag['frequency_master'].' ';
@@ -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'],
diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php
index d239a371..467204db 100644
--- a/api/application/helpers/getprocessedjson_helper.php
+++ b/api/application/helpers/getprocessedjson_helper.php
@@ -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)
diff --git a/api/application/helpers/myutil_helper.php b/api/application/helpers/myutil_helper.php
index c389bdc7..643e8675 100644
--- a/api/application/helpers/myutil_helper.php
+++ b/api/application/helpers/myutil_helper.php
@@ -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)
diff --git a/api/application/helpers/neighbourreferencecheckform_helper.php b/api/application/helpers/neighbourreferencecheckform_helper.php
index 336173ff..c04e7c0d 100644
--- a/api/application/helpers/neighbourreferencecheckform_helper.php
+++ b/api/application/helpers/neighbourreferencecheckform_helper.php
@@ -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.";
diff --git a/api/application/helpers/otherfamilyform_helper.php b/api/application/helpers/otherfamilyform_helper.php
index 429edc74..fcc82e96 100644
--- a/api/application/helpers/otherfamilyform_helper.php
+++ b/api/application/helpers/otherfamilyform_helper.php
@@ -4,6 +4,7 @@ class Otherfamilyform
{
public static function getFamilyDetails($values){
$mergeResult=array();
+ $rupee_symbol = "₹ ";
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 '.'₹ '.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.';
diff --git a/api/application/helpers/pdscore_helper.php b/api/application/helpers/pdscore_helper.php
index 77bc520c..d58b3915 100644
--- a/api/application/helpers/pdscore_helper.php
+++ b/api/application/helpers/pdscore_helper.php
@@ -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 -----------*/
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index c55c0ff1..fb2b84d5 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -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');
diff --git a/api/application/views/business_scorecard.php b/api/application/views/business_scorecard.php
index aae91c18..1d1f07d7 100644
--- a/api/application/views/business_scorecard.php
+++ b/api/application/views/business_scorecard.php
@@ -1,3 +1,3 @@
"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'.',';}}
-?>
\ No newline at end of file
+?>
\ No newline at end of file
diff --git a/api/application/views/general_scorecard.php b/api/application/views/general_scorecard.php
index b40bb974..70b1f529 100644
--- a/api/application/views/general_scorecard.php
+++ b/api/application/views/general_scorecard.php
@@ -1,3 +1,3 @@
"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'.',';}}
-?>
\ No newline at end of file
+?>
\ No newline at end of file
diff --git a/api/application/views/js/phantomchart.js b/api/application/views/js/phantomchart.js
index 9c68059e..c75ecbb5 100644
--- a/api/application/views/js/phantomchart.js
+++ b/api/application/views/js/phantomchart.js
@@ -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);});
\ No newline at end of file
+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);});
\ No newline at end of file
diff --git a/api/application/views/js/phantomdsc.js b/api/application/views/js/phantomdsc.js
index 8cbcab6f..1030abd0 100644
--- a/api/application/views/js/phantomdsc.js
+++ b/api/application/views/js/phantomdsc.js
@@ -1 +1 @@
-var wpage = require('webpage').create();var Content = ' ';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();};
\ No newline at end of file
+var wpage = require('webpage').create();var Content = ' ';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();};
\ No newline at end of file
diff --git a/api/application/views/js/phantomsatellite.js b/api/application/views/js/phantomsatellite.js
index ec1a1a4d..5928e152 100644
--- a/api/application/views/js/phantomsatellite.js
+++ b/api/application/views/js/phantomsatellite.js
@@ -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);});
\ No newline at end of file
+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);});
\ No newline at end of file
diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php
index 9072e521..182cfb01 100644
--- a/api/application/views/report_templates/JSONTOREPORT.php
+++ b/api/application/views/report_templates/JSONTOREPORT.php
@@ -8,8 +8,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
+
@@ -193,7 +283,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$rupee_symbol = "₹ ";
?>
";
+ echo " ";
echo "";
echo "
PERSONAL DISCUSSION REPORT ";
@@ -207,24 +297,22 @@ defined('BASEPATH') OR exit('No direct script access allowed');
PD Initiated Date ".$pd_master_details[0]['pd_date_of_initiation']." ";
- echo "PD Vist Date ".$pd_master_details[0]['scheduled_on']." ";
+ echo "PD Vist Date ".$pd_master_details[0]['pd_visit_date']." ";
echo "PD Report Date ".$pd_master_details[0]['pd_report_generated_date']." ";
echo "PD Initiated by ".$pd_master_details[0]['branch_name']." Branch ";
echo "Loan Application ID ".$pd_master_details[0]['lender_applicant_id']." ";
echo "Product ".$pd_master_details[0]['product_name']." ";
- echo "Customer Segment ".$pd_master_details[0]['customer_segment_name']." ";
+ echo "Customer Segment ".(explode('-',$pd_master_details[0]['customer_segment_name'])[0])." ";
?>
Loan Amount Applied For : ";
- echo "
- As Per PD Initiation ₹ " . MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). "(". MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .")
- As Per Loan Applicants during PD ₹ " . MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). "(". MYUTIL::numtowords($loan_form['loan_amount']) .")
-
- ";
- echo "
";
+ echo '
+ As Per PD Initiation ₹ ' . MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
+ As Per Loan Applicants during PD ₹ ' . MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '('. MYUTIL::numtowords($loan_form['loan_amount']) .')
';
+ //echo "
";
echo "
";
?>
@@ -242,18 +330,26 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$all_company_details = $general_form['companies'];
}
- ?>
-
+ ?>
+ $individual)
{
+
if($individual['is_person_met'] == true)
{
+ //array_push($person_met_images);
+ $temp_person_met = array();
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ;
- echo ' '.$individual['applicant_title_name_master'] .' '. $applicant_name.' ' ;
-
+ //echo ' '.$individual['applicant_title_name_master'] .' '. $applicant_name.' ' ;
+ $temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
+ $temp_person_met['photo'] = isset($individual['is_person_met_pic']) ? $individual['is_person_met_pic'] : null;
+ $temp_person_met['id_proof'] = isset($individual['is_person_met_id_proof']) ? $individual['is_person_met_id_proof'] : null;
$company_relationship_data = null;
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
@@ -262,9 +358,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//FInd Company Name from JSON
$company_relationship_data .= $company_with_relationship['company_relationship_master'].' '.$company_with_relationship['company_name'];
- $company_relationship_data.='and ';
+ //$company_relationship_data.='and ';
+ $company_relationship_data.=', ';
}
}
+ //$temp_person_met['name'] =
//print_r($general_form['persons_with_relationships']);die();
$personal_relationship_data = null;
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
@@ -275,22 +373,85 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(isset($persons_with_relationship['relationship_master']))
{
$personal_relationship_data .= $persons_with_relationship['relationship_master'] .' Of '. $RSNA;
- $personal_relationship_data.='and ';
+ //$personal_relationship_data.='and ';
+ $personal_relationship_data.=', ';
}
}
}
$company_relationship_data .= $personal_relationship_data;
+ $temp_person_met['relations'] = $company_relationship_data;
+ array_push($person_met_data,$temp_person_met);
+
//echo $company_relationship_data;
- echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, 'and '),strlen($company_relationship_data));
+ //echo substr_replace($company_relationship_data, ' ', strrpos($company_relationship_data, 'and '),strlen($company_relationship_data));
+
+ //echo ' ';
}
}
+
+ //print_r($person_met_data);
+ // echo '';
+ // echo ' Name Photo ID Proof Relationships ';
+ // echo '';
+ // foreach($person_met_data as $person)
+ // {
+
+ // echo ''.$person['name'].' '.' '.' '.' '.' '.$person['relations'].' ';
+
+ // }
+ // echo ' ';
+ // echo '
';
+
+ // echo ' ';
+ echo 'Person(s) Met:
';
+ echo '';
+ foreach($person_met_data as $pk => $person)
+ {
+
+ echo '
'.$person['name'].'
';
+ echo '
'.$person['relations'].'
';
+ echo '
';
+ if($person['photo'])
+ {
+ echo ' ';
+ }
+ echo ' ';
+ if($person['id_proof'])
+ {
+ echo ' ';
+ }
+ echo '
';
+ echo count($person_met_data) != ($pk+1)? '
':'';
+
+ }
+ echo '
';
+ echo ' ';
?>
-
+
+ Person(s) Met: ';
+ // foreach($person_met_data as $person)
+ // {?>
+
+
+
-
- Loan Applicants
+
+
+ Loan Applicants:
Name Age (Yrs) Qualification Relationships
$individual)
{
@@ -322,7 +485,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find" ;
//echo $applicant_name.'**************************';
- echo "".$individual['applicant_title_name_master'].' '.$applicant_name." ".$individual['age']." ".$education_qualification." ";
+ echo ' '.$individual['applicant_title_name_master'].' '.$applicant_name.' '.$individual['age'].' '.$education_qualification.' ';
$company_relationship_data = null;
//print_r($general_form['company_with_relationships']);
@@ -371,8 +534,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
+
+
";
echo "PD Score Summary ";
?>
Actual Score Max Score Score %
- General Section Score
+ General Section Score
- Business Section Score
+ Business Section Score
- Final Remarks Score
+ Final Remarks Score
- Final PD Score
+ Final PD Score
PD Location Address : '.$pd_address['address'].' ,'.$pd_address['city_master'].' ,'.$pd_address['state_master'].' - '.$pincode;
echo ' GPS Coordinates of location where PD Visit was done : '.$pd_master_details[0]['start_location'];
+ echo ' ';
?>
- alt="Satellite Image of location of Where PD was Done" style="width:400;height:200px;" />
+ alt="Satellite Image of location of Where PD was Done" style="width:500px;height:200px;" />
LOAN DETAILS:
'Total Loan Amount applied for','details' => "₹ ".$loan_amount.'('."₹ ".MYUTIL::numtowords($loan_form['loan_amount']).')');
+ $loan_table_dispaly_rows[] = array('particulars' => 'Total Loan Amount applied for','details' => "₹ ".$loan_amount.' ('.MYUTIL::numtowords($loan_form['loan_amount']).')');
$loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months');
@@ -535,23 +705,26 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(strcasecmp($loan_form['is_transfer'],'no'))
{
- $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']).'('."₹ ".MYUTIL::numtowords($loan_form['balance_transfer_amount']).')');
+ $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']).' ('.MYUTIL::numtowords($loan_form['balance_transfer_amount']).')');
- $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['topup_amount']).'('."₹ ".MYUTIL::numtowords($loan_form['topup_amount']).')');
+ $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['topup_amount']).' ('.MYUTIL::numtowords($loan_form['topup_amount']).')');
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'End Use Topup','details' => ($loan_form['end_use_topup_master']));
+
$loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender_master']);
}
else{
- $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹ ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).'('."₹ ".MYUTIL::numtowords($loan_form['own_contribution']).')' );
+ $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹ ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' );
$source_of_own_contribution = null;
foreach($loan_form['source_of_own_contribution_master'] as $own_source)
{
- if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and'; }
+ if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and '; }
}
- $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, 'and'),strlen($source_of_own_contribution));
+ $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution));
$loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution);
}
@@ -560,7 +733,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => $loan_form['property_type_master']);
- $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and'; }
+ $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; }
$owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list));
$loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list);
@@ -583,6 +756,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
".$loan_form['loandetails_remarks'];
?>
@@ -590,9 +764,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
- 0) {
- for($business_count = 0;$business_count < $total_no_of_business; $business_count++)
- {
+ 0) {
+ for($business_count = 0;$business_count < $total_no_of_business; $business_count++)
+ {
// $temp_show = null;
// if($temp_show == null)
@@ -601,8 +775,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
0)
{
- $bindEachResult['company_empployees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.';
+ $bindEachResult['company_employees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.';
}else{
- $bindEachResult['company_empployees'].= ' and no temporary employess found';
+ $bindEachResult['company_employees'].= ' and no temporary employess with company';
}
if(isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0)
{
- $bindEachResult['officer_visit_company_empployees']='At the time of PD visit, approximately '.$businessRow['officer_total'] .' employee(s) during the visit at the business premises.';
+ $emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee';
+ $bindEachResult['officer_visit_company_employees']='At the time of PD visit,the officer sighted '.$businessRow['officer_total'] .' '.$emp.' at the business premises.';
}
else{
- $bindEachResult['officer_visit_company_empployees']='At the time of PD visit, PD officer could not able to see any of employees at the business premises.';
+ $bindEachResult['officer_visit_company_employees']='At the time of PD visit, PD officer could not able to see any of employees at the business premises.';
}
//this is documents visited
$getDocuments=array();
if(array_key_exists('shop_eat_act_cert',$businessRow) && strtoupper($businessRow['shop_eat_act_cert'])=='YES'){
- array_push($getDocuments,'Shop/Est act Certificate.');
+ array_push($getDocuments,array('name'=>'Shop/Est act Certificate.','img' => isset($businessRow['shop_eat_act_cert_pic']) ? $businessRow['shop_eat_act_cert_pic'] : ''));
}
if(array_key_exists('gst_Regn_cert',$businessRow) && strtoupper($businessRow['gst_Regn_cert'])=='YES'){
- array_push($getDocuments,'GST Registration.');
+ array_push($getDocuments,array('name' => 'GST Registration.','img' => isset($businessRow['gst_Regn_cert_pic']) ? $businessRow['gst_Regn_cert_pic'] : '' ));
}
if(array_key_exists('pf_regn',$businessRow) && strtoupper($businessRow['pf_regn'])=='YES'){
- array_push($getDocuments,'PF Registration.');
+ array_push($getDocuments,array('name' => 'PF Registration.','img' => isset($businessRow['pf_regn_pic']) ? $businessRow['pf_regn_pic'] : ''));
}
if(array_key_exists('esic_regn',$businessRow) && strtoupper($businessRow['esic_regn'])=='YES'){
- array_push($getDocuments,'ESIC Registration.');
+ array_push($getDocuments,array('name' => 'ESIC Registration.','img' => isset($businessRow['esic_regn_pic'])) ? $businessRow['esic_regn_pic'] : '');
}
if(array_key_exists('export_import_cert',$businessRow) && strtoupper($businessRow['export_import_cert'])=='YES'){
- array_push($getDocuments,'Export/Import Certificate.');
+ array_push($getDocuments,array('name' => 'Export/Import Certificate.','img' => isset($businessRow['export_import_cert_pic'])) ? $businessRow['export_import_cert_pic'] : '');
}
if(array_key_exists('factory_cert',$businessRow) && strtoupper($businessRow['factory_cert'])=='YES'){
- array_push($getDocuments,'Factory Certificate.');
+ array_push($getDocuments,array('name' => 'Factory Certificate.','img' => isset($businessRow['factory_cert_pic'])) ? $businessRow['factory_cert_pic'] : '');
}
if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){
foreach($businessRow['documents'] as $docValue){
- array_push($getDocuments,$docValue['document'].'.');
+ array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => ''));
}
}
$bindEachResult['visit_documents']=$getDocuments;
@@ -728,10 +906,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
- Company / Firm Name:
- Business Entity Type:
- Date of Incorporation:
- Business Vintage:
+ Company / Firm Name :
+ Business Entity Type :
+
+ Date of Incorporation :
+
+ Business Vintage :
@@ -753,17 +933,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
-
-
-
-
+
+
+
+
+
- 0){ ?>
+
+ 0){ ?>
Other Family Members involved in business :
@@ -780,6 +963,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
@@ -789,6 +973,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
@@ -1044,31 +1229,50 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
-
+
+
-
+
The below documents were sighted during the visit :
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
0){ ?>
+
+
Assets used in Buisness
@@ -1111,16 +1317,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$rent_amount = isset($baRow['rent_amount']) ? $rupee_symbol.MYUTIL::customIndianNumberFormat((double)$baRow['rent_amount']): '0.00';
?>
-
-
-
-
-
+
+
+
+
+
-
+
@@ -1152,23 +1360,23 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
// customer
if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && (!isset($businessFinancialRow['estimated_value']))){
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0){
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['estimated_value']);
$bindBusinessFinancial['customer_statements_header']=FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['estimated_value']);
}
else {
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are same as financial statement.";
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are same as financial statement.";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
$bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days'];
$bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days'];
- $bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] != "" : 'Data Not Provided';
+ $bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided';
$bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available'];
foreach($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v)
{
@@ -1231,9 +1439,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
- Sales / Revenue (Rs) '.$bfRow['financial_sales_revenue'].'';}?>
+ Sales / Revenue (Rs) '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']).'';}?>
- Net Profit / (Net Loss) (Rs) '.$bfRow['financial_net_profit'].'';}else{ echo '('.$bfRow['financial_net_loss'].') '; } }?>
+ Net Profit / (Net Loss) (Rs) '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']).'';}else{ echo '('.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']).') '; } }?>
Net Profit or (Net Loss) to Sales % '.$bfRow['financial_margin_of_profit'].' %';}else { echo '('.$bfRow['financial_margin_of_loss'].' %) '; } }?>
@@ -1366,7 +1574,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
- 0){ ?>
+ 0){ ?>
+
Business Banking:
@@ -1378,6 +1589,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
OD/CC Limit(Rs)
+ Main Business AC
@@ -1392,6 +1604,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
@@ -1621,15 +1834,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplierResult=array();
// this is for manufacturing
$supplier_details = $pd_processed_forms[1][$business_count];
- $clientRow = json_decode($supplier_details['processed_json'],true);
-
- $company_name = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
- $total_no_of_suppliers = count($clientRow['manufacturing_details']);
+ $supplierRow = json_decode($supplier_details['processed_json'],true);
+ //print_r($supplierRow);
+ $company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
+ $total_no_of_suppliers = count($supplierRow['manufacturing_details']);
$total_payments_percent_on_credit_for_supplier = 0;
- foreach($clientRow['manufacturing_details'] as $manuRow){
- $total_payments_percent_on_credit_for_supplier = $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
+ foreach($supplierRow['manufacturing_details'] as $manuRow){
+ $total_payments_percent_on_credit_for_supplier = $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
if(isset($manuRow['main_raw_materials'])){
@@ -1666,14 +1879,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp['supplier_seventh_row'] = '7 No of Days Credit ';
- $temp['supplier_seventh_row'] .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? ''. $raw['manufacturing_credit_days_from'].' to '. $raw['manufacturing_credit_days_to'].' ' : 'NA ';
+ $temp['supplier_seventh_row'] .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? ''. $raw['manufacturing_credit_days_from'].' to '. $raw['manufacturing_credit_days_to'].' days ' : 'NA ';
array_push($supplierResult,$temp);
}
}
}
// this is for trading
- foreach($clientRow['trade_details'] as $tradeRow){
+ foreach(isset($clientRow['trade_details']) && $clientRow['trade_details'] as $tradeRow){
$total_payments_percent_on_credit_for_supplier = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
@@ -1830,14 +2043,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
-
-
-
+
+
+
+
-
+
@@ -1847,10 +2062,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
-
-
-
+
+
+
+
@@ -1861,10 +2076,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
-
-
-
+
+
+
+
@@ -1873,21 +2088,72 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Considering the size of operations, the stock of goods maintained is sufficient as per the PD Officer’s observations.";
+ echo 'Considering the size of operations, the stock of goods maintained is sufficient as per the PD Officer’s observations.
';
}else if(!strcasecmp($is_stock_sufficient_enough,'no')){
- echo "Considering the size of operations, the stock of goods maintained is not sufficient as per the PD Officer’s observations.
";
+ echo 'Considering the size of operations, the stock of goods maintained is not sufficient as per the PD Officer’s observations.
';
}
if(!strcasecmp($is_raw_materials_sufficient_enough,'yes'))
{
- echo "Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.
";
+ echo 'Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.
';
}else if(!strcasecmp($is_raw_materials_sufficient_enough,'no'))
{
- echo "Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.
";
+ echo 'Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.
';
}
+ $stock_photo_count = $pd_images[11];
+ //echo count($stock_photo_count);
+
+ $stock_img_row_count = ceil(count($stock_photo_count) / 5);
+ //echo $stock_img_row_count;
+ if(count($stock_photo_count)){
+ echo ' ';
+ echo 'Stock Photograph`s :
';
+ echo ' ';
+ echo '';
+ //echo '';
+
+ // echo '';
+ // foreach($stock_photo_count as $stock)
+ // {
+ // echo $stock['pd_document_title'];
+ // echo '
';
+ // echo ' ';
+
+ // }
+ //echo '';
+ for($img_row = 1; $img_row <= $stock_img_row_count; $img_row++)
+ {
+
+ echo '
';
+ $from = $img_row == 1 ? $img_row : ($img_row+4);
+ $to = ($from + 4);
+ for($stock_photo_iter = $from; $stock_photo_iter <= $to;$stock_photo_iter++)
+ {
+
+ if(isset($stock_photo_count[$stock_photo_iter]) &&$stock_photo_count[$stock_photo_iter]['company_id'] == ($business_count+1))
+ {
+ echo '';
+ echo '';
+ echo '
';
+ echo '
'.$stock_photo_count[$stock_photo_iter]['pd_document_title'].'
';
+ echo '
';
+ echo ' ';
+ //unset($stock_photo_count[$stock_photo_iter]);
+ }
+
+ }
+ //echo " ";
+ echo ' ';
+ }
+ //echo '
';
+ echo '
';
+ }
+ //die();
?>
-
Assessed Income - ".MYUTIL::findCompanyName($all_company_details,($business_count+1),1)."";
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
{
- echo 'As per person met, the following Purchase details were shared:
';
+ echo 'As per person met, the following Purchase details were shared:
';
}
else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
{
@@ -1937,7 +2203,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '';
foreach($ai_core_details_processed['purchase_to_display'] as $dat)
{
- echo ' '.$dat['material_name'] .' '.$dat['qty'] .' '.$dat['uom'] .' '.$dat['rate'] .' '.$dat['frequency'] .' '.$dat['annual_value'] .' ';
+ echo ' '.$dat['material_name'] .' '.$dat['qty'] .' '.$dat['uom'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['rate']) .' '.$dat['frequency'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['annual_value']) .' ';
}
echo ' ';
@@ -1979,19 +2245,19 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
}
- echo " ";
+ echo '';
if(isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer']))
{
- $str = 'As per person met, Rs. '.$ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer'].' declared as annual sale value.';
+ $str = 'As per person met, '.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']).' ( '.MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']).' ) declared as annual sale value.';
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
{
- $str .= 'Also Rs. '.$ai_core_details['sales_declared_by_customer'][0]['margin_value'].' ('.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'%) as net margin amount';
+ $str .= ' Also '.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']).' ( '.MYUTIL::numtowords( $ai_core_details['sales_declared_by_customer'][0]['margin_value']).' )'.'( '.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'% sales declared ) as net margin amount.';
}
echo $str;
- echo ' ';
+ echo '
';
}
-
+ //die();
if(isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise']))
{
echo 'Sales Itemwise :
';
@@ -2003,10 +2269,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
foreach($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid)
{
echo '';
- echo ''.$sid['sale_item'].' '.$sid['sales_qty'].' '.$sid['uom'].' '.$sid['rate_per_unit'].' '.$sid['frequency'].' '.$sid['annual_sale_value'].' ';
+ echo ''.$sid['sale_item'].' '.$sid['sales_qty'].' '.$sid['uom'].' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['rate_per_unit']).' '.$sid['frequency'].' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['annual_sale_value']).' ';
if(isset($sid['margin_per'])){echo ''.$sid['margin_per'].' '; }
if(isset($sid['margin_per_uom'])){echo ''.$sid['margin_per_uom'].' '; }
- if(isset($sid['margin_final_value'])){echo ''.$sid['margin_final_value'].' '; }
+ if(isset($sid['margin_final_value'])){echo ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['margin_final_value']).' '; }
echo ' ';
}
@@ -2027,11 +2293,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo 'Item name : ' . $sale_month_wise['sales_item'].' ';
if($sale_month_wise['sales_type'] == 1)
{
- echo ''.$sale_month_wise['month_count'].' month purchase value : '.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Purchase value:'. MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).' ';
+ echo ''.$sale_month_wise['month_count'].' month purchase value : '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Purchase value:'.$rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).' ';
}
else
{
- echo 'Annual Purchase value:'. MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).' ';
+ echo 'Annual Purchase value:'. $rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).' ';
}
echo ' ';
foreach($sale_month_wise['months'] as $sale_month_data)
@@ -2082,12 +2348,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo 'Business Expenses Details :
';
echo '';
echo '';
- echo ' Business Expense Amount (Rs) Frequency Annual Expenses(Rs) ';
+ echo ' Business Expense Amount Frequency Annual Expenses ';
echo ' ';
echo '';
foreach($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp)
{
- echo ' '.$b_exp['expense_item'] .' '.$b_exp['expense_value'] .' '.$b_exp['frequency_name'] .' '.$b_exp['annual_expenses_value'] .' ';
+ echo ' '.$b_exp['expense_item'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($b_exp['expense_value']) .' '.$b_exp['frequency_name'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($b_exp['annual_expenses_value']).' ';
}
echo ' ';
echo '
';
@@ -2103,13 +2369,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '';
foreach($ai_core_details_processed['household_expenses_to_diaplay'] as $h_exp)
{
- echo ' '.$h_exp['expense_item'] .' '.$h_exp['expense_value'] .' '.$h_exp['frequency_name'] .' '.$h_exp['annual_expense_value'] .' ';
+ echo ' '.$h_exp['expense_item'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($h_exp['expense_value']) .' '.$h_exp['frequency_name'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($h_exp['annual_expense_value']) .' ';
}
echo ' ';
echo '
';
}
-
+
if(isset($ai_core_details) && count($ai_summary_details_processed))
{
echo 'The Summary of Income :
';
@@ -2160,7 +2426,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$otherAssetResult=array();
foreach($pd_processed_forms[4] as $rowKey=> $oaRow) {
$otherAssetRow = json_decode($oaRow['processed_json'],true);
- //print_r($otherAssetRow);
+ //print_r($otherAssetRow);die();
//echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";
if(count($otherAssetRow['assets_details'])>0){
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
@@ -2231,7 +2497,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Sr.No
- Account Name
+ Account Holder's Name
Bank Name
Account Type
@@ -2249,7 +2515,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
+
@@ -2317,7 +2583,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$familyResult=array();
foreach($pd_processed_forms[6] as $rowKey=> $fRow) {
$familyRow = json_decode($fRow['processed_json'],true);
- //print_r($familyRow);
+ //print_r($familyRow);die();
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
}
@@ -2328,10 +2594,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//print_r($familyResult);die();
?>
Family Information:
- $fmValue) { ?>
+ $fmValue) { ?>
$elRow) {
$otherLoanRow = json_decode($elRow['processed_json'],true);
+ //print_r($otherLoanRow);die();
$total_no_of_data = 0;
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
$total_no_of_data = count($otherLoanRow['loan_details']);
@@ -2471,7 +2738,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
- Neighbourhood Check Status is
+ Neighbourhood Check Status is
PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS
Customer Behaviour:
-
+
+ ✔';
+ ?>
+
+
+
+ Polite
+
+
+ Rude
+
+
+
+ Others mentioned as below
+
+
+
+
Suitability of Business Location:
-
-
-
- Well Suited ✔
+
+
+
+
+
+ Well Suited
+
+
+ Fairly Suited
+
+
+
+ Not Suited
+
+
+
+
PD Officer’s overall assessment:
-
-
-
+
+
+
+
+
+ Positive
+
+
+ Refer to Credit
+
+
+
+ Negative
+
+
+
+
+ Others
+
+
+
+
+
- PD officer recommendation is . The following points were considered while arriving at the aforementioned status.
- PD officer recommendation is '.$fo_diplay.'';?>. The following key points were considered while arriving at the aforementioned status.
+ "; foreach($final_remark_data['recommendation_positive'] as $pos){ echo "".$pos['reason_for_positive']." ";}
- }else if($negative){ echo ""; foreach($final_remark_data['recommendation_negative'] as $neg){ echo "".$neg['recommendation_negative']." ";}
+ }else if($negative){ echo ""; foreach($final_remark_data['recommendation_negative'] as $neg){ echo "".$neg['reason_for_negative']." ";}
}
else if($refer_to_credit){ echo ""; foreach($final_remark_data['recommendation_positive'] as $rtc){ echo "".$rtc['reason_for_refer_to_credit']." ";}
}
@@ -2607,11 +2930,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$question = MYUTIL::findQuestionByKey($score_questions_display,$key);
$span = '('.$general['l1_weightage'].'% * '. $general['l2_weightage'].'% * '.$general['score_band'].') ';
$max_span = '('.$general['l1_weightage'].'% * '. $general['l2_weightage'].'% * '.$general['max_score_band'].') ';
- echo ''.''.$question.' '.$general['l2_weightage'] .'% '.$general['answer'].
- ' '.$general['score_band'].' '.$general['attributed_score'].' '.$span.' '.$general['max_score'].' '.$max_span.' ';
+ echo ''.''.$question.' '.$general['l2_weightage'] .'% '.$general['answer'].
+ ' '.$general['score_band'].' '.$general['attributed_score'].' '.$span.' '.$general['max_score'].' '.$max_span.' ';
}
- echo " General Section Sum of Attributed Score | Sum of Max Score ".number_format($pd_score['score_summary']['general']['actual_score'],2,'.',',')." ".number_format($pd_score['score_summary']['general']['max_score'],2,'.',',')." ";
+ echo ' General Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['general']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['general']['max_score'],2,'.',',').' ';
echo '
';
echo ' ';
@@ -2621,17 +2944,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '';
echo " Asset Value Calculaitons ";
- echo " Actual Value Of Assets(a) ". number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'],2,'.',',')." ";
+ echo " Actual Value Of Assets (a) ". number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'],2,'.',',')." ";
- echo " Loan Amount(b) ". number_format($pd_score['score_summary']['asset_calculation_details']['loan_amount'],2,'.',',')." ";
+ echo " Loan Amount (b) ". number_format($pd_score['score_summary']['asset_calculation_details']['loan_amount'],2,'.',',')." ";
- echo " Avg Expected Value Of Assets(c) ". round($pd_score['score_summary']['asset_calculation_details']['avg_expected_value_of_assets'],2)."% ";
+ echo " Avg Expected Value Of Assets (c) ". round($pd_score['score_summary']['asset_calculation_details']['avg_expected_value_of_assets'],2)."% ";
- echo " Expected Value Of Assets(d = c*b) ". number_format($pd_score['score_summary']['asset_calculation_details']['expected_value_of_assets'],2,'.',',')." ";
+ echo " Expected Value Of Assets (d = c*b) ". number_format($pd_score['score_summary']['asset_calculation_details']['expected_value_of_assets'],2,'.',',')." ";
- echo " Actual Value Of Assets Percentage(e = (a/b) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets_percentage'],2)."% ";
+ echo " Actual Value Of Assets Percentage (e = (a/b) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets_percentage'],2)."% ";
- echo " Variance(f = ((e-c)/c) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['variance'],2)." ";
+ echo " Variance (f = ((e-c)/c) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['variance'],2)."% ";
echo " Score As per Grid ". round($pd_score['score_summary']['asset_calculation_details']['score'],2)." ";
@@ -2651,10 +2974,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$max_span = '('.$final_remark['l1_weightage'].'% * '. $final_remark['l2_weightage'].'% * '.$final_remark['max_score_band'].') ';
- echo ''.''.$question.' '.$final_remark['l2_weightage'].'% '.$final_remark['answer'].' '.$final_remark['score_band'].' '.$final_remark['attributed_score'].' '.$span.' '.$final_remark['max_score'].' '.$max_span.' ';
+ echo ''.''.$question.' '.$final_remark['l2_weightage'].'% '.$final_remark['answer'].' '.$final_remark['score_band'].' '.$final_remark['attributed_score'].' '.$span.' '.$final_remark['max_score'].' '.$max_span.' ';
}
- echo " Final Remarks Section Sum of Attributed Score | Sum of Max Score ".number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.',',')." ".number_format($pd_score['score_summary']['final_remarks']['max_score'],2,'.',',')." ";
+ echo ' Final Remarks Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['final_remarks']['max_score'],2,'.',',').' ';
echo '
';
echo ' ';
@@ -2672,18 +2995,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$max_span = '('.$business['l1_weightage'].'% * '. $business['l2_weightage'].'% * '.$business['max_score_band'].') ';
if($key != 'cerificates')
{
- echo ' '.''.$question.' '.$business['l2_weightage'].'% '.$business['answer'].' '.$business['score_band'].' '.$business['attributed_score'].' '.$span.' '.$business['max_score'].' '.$max_span.' ';
+ echo ''.''.$question.' '.$business['l2_weightage'].'% '.$business['answer'].' '.$business['score_band'].' '.$business['attributed_score'].' '.$span.' '.$business['max_score'].' '.$max_span.' ';
}
if($key == 'cerificates')
{
$certificates = $business;
- echo ''.' Certificates '.round($business['l2_weightage'],2).'% '.'Refer Cert Table'.' '.$business['score_band'].' '.$business['attributed_score'].' '.$business['max_score'].' ';
+ echo ''.' Certificates '.round($business['l2_weightage'],2).'% '.'Refer Cert Table'.' '.$business['score_band'].' '.$business['attributed_score'].' '.$business['max_score'].' ';
}
}
- echo " Business Section Sum of Attributed Score | Sum of Max Score ".number_format($pd_score['score_summary']['business']['actual_score'],2,'.',',')." ".number_format($pd_score['score_summary']['business']['max_score'],2,'.',',')." ";
+ echo ' Business Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['business']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['business']['max_score'],2,'.',',').' ';
echo '
';
@@ -2706,7 +3029,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$max_span = '('.$cerificate['l1_weightage'].'% * '. $cerificate['l2_weightage'].'% * '.$cerificate['max_score_band'].') ';
- echo ''.''.$question.' '.$cerificate['answer'].' '.$cerificate['score_band'].' '.round($cerificate['attributed_score'],3).' '.$span.' '.round($cerificate['max_score'],3).' '.$max_span.' ';
+ echo ''.''.$question.' '.$cerificate['answer'].' '.$cerificate['score_band'].' '.round($cerificate['attributed_score'],3).' '.$span.' '.round($cerificate['max_score'],3).' '.$max_span.' ';
}
}
echo "";
diff --git a/api/application/views/report_templates/JSONTOREPORT_karthick.php b/api/application/views/report_templates/JSONTOREPORT_karthick.php
index 3263a816..1ed98c5c 100644
--- a/api/application/views/report_templates/JSONTOREPORT_karthick.php
+++ b/api/application/views/report_templates/JSONTOREPORT_karthick.php
@@ -4,37 +4,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
+
-
-
+
-
-
-
+
+
-
+
-
+
+
+ ₹";
+ ?>
";
- echo "";
- echo "
PERSONAL DISCUSSION REPORT ";
+ echo "
";
+
+ echo "
";
+ echo "
PERSONAL DISCUSSION REPORT ";
echo "for the case of ";
- echo "".$pd_master_details[0]['title_name'].$pd_master_details[0]['main_applicant']." ";
+ echo "".$main_applicant_name." ";
echo "";
echo "
";
?>
PD Report Date ".$pd_master_details[0]['updatedon']." ";
- echo "PD Vist Date ".$pd_master_details[0]['scheduled_on']." ";
- echo "PD Initiated by ".$pd_master_details[0]['branch_name']." Branch ";
- echo "Loan Applicant ID ".$pd_master_details[0]['lender_applicant_id']." ";
- echo "Product ".$pd_master_details[0]['product_name']." ";
- echo "Customer Segment ".$pd_master_details[0]['customer_segment_name']." ";
+ echo "PD Initiated Date ".$pd_master_details[0]['pd_date_of_initiation']." ";
+ echo "PD Vist Date ".$pd_master_details[0]['pd_visit_date']." ";
+ echo "PD Report Date ".$pd_master_details[0]['pd_report_generated_date']." ";
+ echo "PD Initiated by ".$pd_master_details[0]['branch_name']." Branch ";
+ echo "Loan Application ID ".$pd_master_details[0]['lender_applicant_id']." ";
+ echo "Product ".$pd_master_details[0]['product_name']." ";
+ echo "Customer Segment ".(explode('-',$pd_master_details[0]['customer_segment_name'])[0])." ";
?>
-
+
Loan Amount Applied For ";
-
- echo "
-
- As Per PD Initiation As Per Loan Applicants during PD
-
-
- Rs " . number_format($pd_master_details[0]['loan_amount']). ". ####
-
-
- ";
- echo "
";
-
-
- //####################General Section Statred########################
+ echo "
Loan Amount Applied For :
";
+ echo '
+ As Per PD Initiation ₹ ' . MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
+ As Per Loan Applicants during PD ₹ ' . MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '('. MYUTIL::numtowords($loan_form['loan_amount']) .')
';
+ //echo "
";
+ echo "
";
+ ?>
+
+
+
+
+
-
General Section Information
-
+
+ ?>
+ $individual)
{
+
if($individual['is_person_met'] == true)
{
- echo ($individual['applicant_title_name_master'] .$individual['pd_co_applicant_id_master']);
-
+ //array_push($person_met_images);
+ $temp_person_met = array();
+ $applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ;
+ //echo ' '.$individual['applicant_title_name_master'] .' '. $applicant_name.' ' ;
+ $temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
+ $temp_person_met['photo'] = isset($individual['is_person_met_pic']) ? $individual['is_person_met_pic'] : null;
+ $temp_person_met['id_proof'] = isset($individual['is_person_met_id_proof']) ? $individual['is_person_met_id_proof'] : null;
+ $company_relationship_data = null;
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
-
-
- echo ' '.$company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name'];
+ $company_relationship_data .= $company_with_relationship['company_relationship_master'].' '.$company_with_relationship['company_name'];
+
+ //$company_relationship_data.='and ';
+ $company_relationship_data.=', ';
}
}
-
+ //$temp_person_met['name'] =
+ //print_r($general_form['persons_with_relationships']);die();
+ $personal_relationship_data = null;
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
- if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && $persons_with_relationship['relationship'] != null)
- {
- echo ' '.$persons_with_relationship['relationship_master'] .' Of '.$persons_with_relationship['relation_to_master'];
- //print_r($persons_with_relationship);
+ if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship']))
+ {
+ $RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
+ if(isset($persons_with_relationship['relationship_master']))
+ {
+ $personal_relationship_data .= $persons_with_relationship['relationship_master'] .' Of '. $RSNA;
+ //$personal_relationship_data.='and ';
+ $personal_relationship_data.=', ';
+
+ }
}
}
+ $company_relationship_data .= $personal_relationship_data;
+ $temp_person_met['relations'] = $company_relationship_data;
+ array_push($person_met_data,$temp_person_met);
+ //echo $company_relationship_data;
+ //echo substr_replace($company_relationship_data, ' ', strrpos($company_relationship_data, 'and '),strlen($company_relationship_data));
+
+ //echo ' ';
}
}
+
+ //print_r($person_met_data);
+ // echo '';
+ // echo ' Name Photo ID Proof Relationships ';
+ // echo '';
+ // foreach($person_met_data as $person)
+ // {
+
+ // echo ''.$person['name'].' '.' '.' '.' '.' '.$person['relations'].' ';
+
+ // }
+ // echo ' ';
+ // echo '
';
+
+ // echo ' ';
+ echo 'Person(s) Met:
';
+ echo '';
+ foreach($person_met_data as $pk => $person)
+ {
+
+ echo '
'.$person['name'].'
';
+ echo '
'.$person['relations'].'
';
+ echo '
';
+ if($person['photo'])
+ {
+ echo ' ';
+ }
+ echo ' ';
+ if($person['id_proof'])
+ {
+ echo ' ';
+ }
+ echo '
';
+ echo count($person_met_data) != ($pk+1)? '
':'';
+
+ }
+ echo '
';
+ echo ' ';
?>
-
-
-
-
-
-
Loan Applicants
-
-
Person(s) Met: ';
+ // foreach($person_met_data as $person)
+ // {?>
+
+
+
+
+
+
+ Loan Applicants:
+
+
+ Name Age (Yrs) Qualification Relationships
+
+
+ $individual)
{
if($individual['is_applicant'] == true)
{
- echo "".$individual['applicant_title_name_master'].$individual['pd_co_applicant_id_master']." ";
+ $education_qualification = $individual['qualification_master'];
+ $education_qualification = $individual['course_name'] != "" || $individual['course_name'] != null ? $education_qualification.' ('.$individual['course_name'].')' : $education_qualification;
+
+
+ $applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find" ;
+ //echo $applicant_name.'**************************';
+ echo ' '.$individual['applicant_title_name_master'].' '.$applicant_name.' '.$individual['age'].' '.$education_qualification.' ';
+
+ $company_relationship_data = null;
+ //print_r($general_form['company_with_relationships']);
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
+
+ //print_r($company_with_relationship);
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
-
- print_r($company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name']);
+ //echo "ONCE";
+ $company_relationship_data = ($company_with_relationship['company_relationship_master'] .' '.$company_with_relationship['company_name']);
+
+ $company_relationship_data.='and ';
}
}
-
+ //echo '*********'.$company_relationship_data.'*********';
+ //echo strrpos($company_relationship_data, '');
+ // $company_relationship_data = substr_replace($company_relationship_data, '', strrpos($company_relationship_data, 'and '),strlen($company_relationship_data));
+ // echo $company_relationship_data;
+ $personal_relationship_data = null;
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
- if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && $persons_with_relationship['relationship'] != null)
+
+
+
+ if(($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] || !strcasecmp($applicant_name,$persons_with_relationship['applicant_name']))&& isset($persons_with_relationship['relationship']))
{
- echo " ";
- print_r($persons_with_relationship['relationship_master'] .' Of '.$persons_with_relationship['relation_to_master']);
- //print_r($persons_with_relationship);
+
+ $RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
+ if(isset($persons_with_relationship['relationship_master']))
+ {
+ $personal_relationship_data .= $persons_with_relationship['relationship_master'] .' of '. $RSNA;
+
+ $personal_relationship_data.='and ';
+ }
}
}
+ $company_relationship_data .= $personal_relationship_data;
+ echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, 'and '),strlen($company_relationship_data));
- echo " ";
+ echo "";
}
}
?>
-
+
+
- PD Officer's Note (About General Section) :
+
+
+
+
+
+
+
+ ";
+ echo "PD Score Summary ";
-
- Location Details :
-
-
- PD Officer's Note (About Location Details) :
-
-
-
- Loan Details :
-
-
- PD Officer's Note (About Loan Details) :
-
-
+
+ Actual Score Max Score Score %
+ General Section Score
+
+ Business Section Score
+
+ Final Remarks Score
+
+ Final PD Score
+
+
+ ";
-
+ echo '
';
+
+ }
+ else
+ { echo "Score Chart Not Generated "; }
+
+
+
+ //######################### CHART ###########################
+
+
+ if(isset($dsc_cards['base64_dsc_business']))
+ {
+ echo " ";
+
+ echo '
';
+
+ }
+ else
+ { echo "Score Chart Not Generated "; }
+
+ if(isset($dsc_cards['base64_dsc_general']))
+ {
+ echo " ";
+
+ echo '
';
+
+ }
+ else
+ { echo "Score Chart Not Generated "; }
+
+
+ echo "
";
+ //######################### CHART ###########################
+ }
+ ?>
+
+
+
+ PD LOCATION
+
+ PD Location Address : '.$pd_address['address'].' ,'.$pd_address['city_master'].' ,'.$pd_address['state_master'].' - '.$pincode;
+ echo ' GPS Coordinates of location where PD Visit was done : '.$pd_master_details[0]['start_location'];
+ echo ' ';
+ ?>
+
+ alt="Satellite Image of location of Where PD was Done" style="width:500px;height:200px;" />
+
+
+
Location Summary
+ 'well suited','fairly_suited' => 'fairly suited','not_suited' => 'not suited');
+ $address_type = $pd_address['address_type_master'];
+ $estimated_area = $pd_address['estimated_area'].' ';
+ $estimated_area .= $pd_address['uom_others'] != "" || $pd_address['uom_others'] != null ? $pd_address['uom_others'] : $pd_address['uom_master'];
+ $locality = $pd_address['locality_master'];
+ $locality = preg_match("/^[aeiouAEIOU]/U", $locality) ? 'an '.$locality : 'a '.$locality;
+ $property_owner_type = $business_assets_details['business_assets_for_address'][0]['business_ownership_type'];
+ if($property_owner_type == 'rented') { $property_owner_type ='Rented (Rent Rs'.$business_assets_details['business_assets_for_address'][0]['business_monthly_rented_amt'].' Per Month)'; }else{$property_owner_type = 'Owned'; }
+ $yrs_being_run = $business_assets_details['business_assets_for_address'][0]['business_years'].' Years';
+ if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';}
+
+ echo '';
+ echo "The PD visit was done at ". $address_type. " of the loan applicants. ";
+ echo "The ".$address_type." is ".$property_owner_type." and the business has
+ been operation from here for the last $yrs_being_run.";
+ echo " The ".$address_type." is located in ".$locality." and the estimated area of the office is ".$estimated_area." .";
+ echo " The PD location was ". $pd_address['pd_location_master'].", and the locality in which the ".$address_type ." is situated is ".$pd_address['comment_locality_master'] .", as per the general observations made during the visit by PD officer.";
+ echo " The PD officer also made the following observations:" ;
+ echo "
";
+
+ echo " The location of the ".$address_type." is ".$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ]." to the nature of business. ";
+ if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes')
+ {
+ echo "Business Activity was seen during visit. ";
+ }
+ else{
+ echo "No business activity was seen during the PD visit ";
+ }
+ if(isset($business_assets_details['business_assets_form_remark']) && $business_assets_details['business_assets_form_remark'] != ""){
+ echo "".$business_assets_details['business_assets_form_remark'] ." ";}
+ echo " ";
+
+ if($address_form['address_form_remark'])
+ {
+ echo $address_form['address_form_remark'];}
+ echo "";
+ echo "
";
+ //die();
+ ?>
+
+
+
+
+
+
+ LOAN DETAILS:
+ 'Total Loan Amount applied for','details' => "₹ ".$loan_amount.' ('.MYUTIL::numtowords($loan_form['loan_amount']).')');
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months');
+
+ $end_use = 'For ';
+ foreach($loan_form['end_use_master'] as $enduse)
+ {
+ if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';}else{ $end_use.=$loan_form['end_use_other'].' and'; }
+ }
+ $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'),strlen($end_use));
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Loan Purpose','details' => $end_use);
+
+ if(strcasecmp($loan_form['is_transfer'],'no'))
+ {
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']).' ('.MYUTIL::numtowords($loan_form['balance_transfer_amount']).')');
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for','details' => "₹ ".MYUTIL::customIndianNumberFormat($loan_form['topup_amount']).' ('.MYUTIL::numtowords($loan_form['topup_amount']).')');
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'End Use Topup','details' => ($loan_form['end_use_topup_master']));
+
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender_master']);
+
+ }
+ else{
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹ ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' );
+ $source_of_own_contribution = null;
+
+ foreach($loan_form['source_of_own_contribution_master'] as $own_source)
+ {
+ if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and '; }
+ }
+ $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution));
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution);
+ }
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => $rupee_symbol.MYUTIL::customIndianNumberFormat($loan_form['emi_level']).'('.$rupee_symbol.MYUTIL::numtowords($loan_form['emi_level']).')' );
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => $loan_form['property_type_master']);
+
+ $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; }
+ $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list));
+ $loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list);
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']);
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol.MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).'('.MYUTIL::numtowords($loan_form['emv_per_customer']).')');
+
+ //print_r($loan_table_dispaly_rows);die();
+ ?>
+
+
+ S.No Loan Particulars Loan Particular Details
+
+ $row)
+ {
+ echo ' '.($row_key + 1)." ".$row['particulars']." ".$row['details'] ." ";
+ }
+ ?>
+
+
+ ".$loan_form['loandetails_remarks'];
+ ?>
+
+
+
+
+
+ 0) {
+ for($business_count = 0;$business_count < $total_no_of_business; $business_count++)
+ {
+
+ // $temp_show = null;
+ // if($temp_show == null)
+ // {
+ ?>
+
$bRow) {
+
+ $bRow = $pd_processed_forms[13][$business_count];
$businessRow = json_decode($bRow['processed_json'],true);
- $companyList = MYUITIL::findCompanyName($all_company_details,$businessRow['company_id'],2);
+
+ $companyList = MYUTIL::findCompanyName($all_company_details,$businessRow['company_id'],2);
//$companyList .=' The director details are as under :';
- $bindEachResult["company_name"]=$companyList;
+ $bindEachResult["company_details"]=$companyList;
// this is for partner details
if(array_key_exists('partners',$businessRow)){
$bindEachResult["partner"]=Businessform::getPartnerDetails($businessRow['partners']);
@@ -298,6 +793,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// this is for person with relationship
if(array_key_exists('persons_with_relationships',$businessRow)){
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships']);
+
}
else {
$getFamilyMembers=array();
@@ -353,45 +849,74 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['business_peak_details']='The Business has no major changes in sales across season.';
}
// this is for no of employess details
- $bindEachResult['company_empployees']='As per person met there are '.$businessRow['employees_permanent'].' permanent and '.$businessRow['employees_temporary'].' temporary employees with company.';
- $bindEachResult['officer_visit_company_empployees']='The PD Officer could notice approximately '.$businessRow['officer_total'] .' employees during the visit.';
+ if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) {
+ $bindEachResult['company_empployees']='As per person met there are no permanent';
+ }
+ else{
+ $bindEachResult['company_employees']='As per person met, there are '.$businessRow['employees_permanent'].' permanent ';
+ }
+ if(isset($businessRow['employees_temporary']) && $businessRow['employees_temporary'] > 0)
+ {
+ $bindEachResult['company_employees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.';
+ }else{
+ $bindEachResult['company_employees'].= ' and no temporary employess with company';
+ }
+ if(isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0)
+ {
+ $emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee';
+ $bindEachResult['officer_visit_company_employees']='At the time of PD visit,the officer sighted '.$businessRow['officer_total'] .' '.$emp.' at the business premises.';
+ }
+ else{
+ $bindEachResult['officer_visit_company_employees']='At the time of PD visit, PD officer could not able to see any of employees at the business premises.';
+ }
//this is documents visited
$getDocuments=array();
if(array_key_exists('shop_eat_act_cert',$businessRow) && strtoupper($businessRow['shop_eat_act_cert'])=='YES'){
- array_push($getDocuments,'Shop/Est act Certificate.');
+ array_push($getDocuments,array('name'=>'Shop/Est act Certificate.','img' => isset($businessRow['shop_eat_act_cert_pic']) ? $businessRow['shop_eat_act_cert_pic'] : ''));
}
if(array_key_exists('gst_Regn_cert',$businessRow) && strtoupper($businessRow['gst_Regn_cert'])=='YES'){
- array_push($getDocuments,'GST Registration.');
+ array_push($getDocuments,array('name' => 'GST Registration.','img' => isset($businessRow['gst_Regn_cert_pic']) ? $businessRow['gst_Regn_cert_pic'] : '' ));
}
if(array_key_exists('pf_regn',$businessRow) && strtoupper($businessRow['pf_regn'])=='YES'){
- array_push($getDocuments,'PF Registration.');
+ array_push($getDocuments,array('name' => 'PF Registration.','img' => isset($businessRow['pf_regn_pic']) ? $businessRow['pf_regn_pic'] : ''));
}
if(array_key_exists('esic_regn',$businessRow) && strtoupper($businessRow['esic_regn'])=='YES'){
- array_push($getDocuments,'ESIC Registration.');
+ array_push($getDocuments,array('name' => 'ESIC Registration.','img' => isset($businessRow['esic_regn_pic'])) ? $businessRow['esic_regn_pic'] : '');
}
if(array_key_exists('export_import_cert',$businessRow) && strtoupper($businessRow['export_import_cert'])=='YES'){
- array_push($getDocuments,'Export/Import Certificate.');
+ array_push($getDocuments,array('name' => 'Export/Import Certificate.','img' => isset($businessRow['export_import_cert_pic'])) ? $businessRow['export_import_cert_pic'] : '');
}
if(array_key_exists('factory_cert',$businessRow) && strtoupper($businessRow['factory_cert'])=='YES'){
- array_push($getDocuments,'Factory Certificate.');
+ array_push($getDocuments,array('name' => 'Factory Certificate.','img' => isset($businessRow['factory_cert_pic'])) ? $businessRow['factory_cert_pic'] : '');
}
if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){
foreach($businessRow['documents'] as $docValue){
- array_push($getDocuments,$docValue['document'].'.');
+ array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => ''));
}
}
$bindEachResult['visit_documents']=$getDocuments;
array_push($businessResult,$bindEachResult);
- }
+
+
+ //print_r($businessResult);
?>
- Business Details
+ BUSINESS INFORMATION:
$fetchRow){
?>
-
- The director details are as under :
-
+
+ Company / Firm Name :
+ Business Entity Type :
+
+ Date of Incorporation :
+
+ Business Vintage :
+
+
+
+
+
@@ -400,6 +925,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
No.of Years in Current Business
Total Work Experience
Previous Experience
+ Started Business
@@ -407,59 +933,69 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
-
-
-
+
+
+
+
+
- 0){ ?>
+
+ 0){ ?>
-
Besides the above, the below family members are also involved in the business :
+
Other Family Members involved in business :
-
+
Name
- Relation
- Designation
- Started Business
+ Individual Relationship
+ Related to
+ Relationship to Company / Firm
+ Started Business (Yes / No)
-
-
+
+
+
+
-
+
- 0){ ?>
+ 0){ ?>
-
The Manufacturing details are as under :
+
Type of Business Activity : Manufacturing
-
+
- Products
- Area of Sale
- Sales Done
- Max Sales Done
+ Key Products
+ Area of Operations
+ Area of Sale / Service
+ Area where Max Sale / Service done
@@ -479,6 +1015,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
+
+ Brief of the Business / Service Model
+
+
+ Product / Service Process Brief
+
+
+
+
+
+
+
+
+
@@ -487,16 +1038,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
0){ ?>
-
The Retail Trading details are as under :
+
Type of Business Activity : Retail Trading
-
+
- Products
- Area of Sale
- Sales Done
- Max Sales Done
+ Key Products
+ Area of Operations
+ Area of Sale / Service
+ Area where Max Sale / Service done
@@ -516,6 +1067,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
+
+ Brief of the Business / Service Model
+
+
+ Product / Service Process Brief
+
+
+
+
+
+
+
+
@@ -524,16 +1089,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
0){ ?>
-
The Service Provider details are as under :
+
Type of Business Activity : Service Provider
-
+
Services
- Area of Sale
- Services At
- Max Revenue From
+ Area of Operations
+ Area of Sale / Service
+ Area where Max Sale / Service done
@@ -553,6 +1118,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
+
+
+ Brief of the Business / Service Model
+
+
+ Product / Service Process Brief
+
+
+
+
+
+
+
+
@@ -561,16 +1141,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
0){ ?>
-
The Wholesale Trading details are as under :
+
Type of Business Activity : Wholesale Trading
-
+
- Products
- Area of Sale
- Sales Done
- Max Sales Done
+ Key Products
+ Area of Operations
+ Area of Sale / Service
+ Area where Max Sale / Service done
@@ -590,6 +1170,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
+
+
+ Brief of the Business / Service Model
+
+
+ Product / Service Process Brief
+
+
+
+
+
+
+
+
@@ -599,7 +1194,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Other activity details are as under :
-
+
@@ -617,377 +1212,786 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
The below documents were sighted during the visit :
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
+
+
+ 0){
+ $bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
+ }
+ array_push($businessAssetResult,$bindBusinessAsset);
+
+
+ // print_r($businessAssetResult);die();
+ ?>
+
+ 0){ ?>
+
+
+
Assets used in Buisness
+
+
+
+
+
+ S.No
+ Asset Type
+ Asset Description
+ Ownership
+ Monthly Rent
+
+
+
+ $baRow){
+ if(isset($baRow['business_assets_mode_master']))
+ {
+ $rent_amount = isset($baRow['rent_amount']) ? $rupee_symbol.MYUTIL::customIndianNumberFormat((double)$baRow['rent_amount']): '0.00';
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Business asset is not available.
+
+
+
+
+
+
$baRow) {
+ $profit_loss_symbal = '
↑ /
↓ ';
+ $baRow = $pd_processed_forms[14][$business_count];
$businessFinancialRow = json_decode($baRow['processed_json'],true);
- // statement
+ //print_r($businessFinancialRow);die();
+ // statementdate_per_financial
if(strtoupper($businessFinancialRow['is_financial_statements'])=='YES' && count($businessFinancialRow['date_per_financial'])>0){
- $bindBusinessFinancial["company_name"] =MYUITIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
- $bindBusinessFinancial["company_name"] .= count($businessFinancialRow['date_per_financial'])>1 ? ' provided with last '.count($businessFinancialRow['date_per_financial']).' years of financial statements and the snapshot is as below :' : ' we were provided with last '.count($businessFinancialRow['date_per_financial']).' year of financial statements and the snapshot is as below :';
+ $bindBusinessFinancial["company_name"] =MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
+ //$bindBusinessFinancial["company_name"] .= count($businessFinancialRow['date_per_financial'])>1 ? ' provided with last '.count($businessFinancialRow['date_per_financial']).' years of financial statements and the snapshot is as below :' : ' we were provided with last '.count($businessFinancialRow['date_per_financial']).' year of financial statements and the snapshot is as below :';
+ $bindBusinessFinancial["years_data_provided"] = count($businessFinancialRow['date_per_financial']);
$bindBusinessFinancial['statements']=FINANCIALFORM::getBusinessFinancialDetails($businessFinancialRow['date_per_financial']);
}
else {
- $bindBusinessFinancial["company_name"] =MYUITIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
- $bindBusinessFinancial["company_name"] .=' not provided the financial statements :';
+ $bindBusinessFinancial["company_name"] =MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
+ //$bindBusinessFinancial["company_name"] .=' not provided the financial statements :';
$bindBusinessFinancial['statements']=array();
}
// customer
- if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])==0){
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
+ if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && (!isset($businessFinancialRow['estimated_value']))){
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0){
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['estimated_value']);
$bindBusinessFinancial['customer_statements_header']=FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['estimated_value']);
}
else {
- $bindBusinessFinancial["financial_customer"] ="As per customers, the financials are same as financial statement.";
+ $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are same as financial statement.";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
+ $bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days'];
+ $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days'];
+ $bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided';
+ $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available'];
+ foreach($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v)
+ {
+ switch($v['id'])
+ {
+ case 1:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['name'] = $businessFinancialRow['other_reason_for_working_capital_facilities_availed'];
+
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['reason_for_working_capital_facilities_availed'];
+ break;
+
+ case 2:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['bank_guarantee'];
+ break;
+
+ case 3:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['cash_credit_limit'];
+ break;
+
+ case 4:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring'];
+ break;
+ case 5:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring'];
+ break;
+ case 6:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['letter_of_credit'];
+ break;
+ case 7:
+ $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
+ break;
+ }
+ }
+
+
+ $bindBusinessFinancial['working_capital_facilites'] = $businessFinancialRow['select_working_capital_facilities_availed'];
+
+
+ //print_r($bindBusinessFinancial['select_working_capital_facilities_availed']);die(); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
+
array_push($businessFinancialResult,$bindBusinessFinancial);
- }
+
?>
-
Financial Information
+
0){ ?>
-
-
+
Financial Information
+
+
Company / Firm Name :" . $iterateFinance['company_name']; ?>
+
No of Years of Financial Statements provided :" . $iterateFinance['years_data_provided']; ?>
+
Snapshot of Financials as per Books of Account Provided:"; ?>
0){ ?>
-
+
+
- Year
- Sales
- Net Profit
- Net Profit to Sales %
- Net Loss
- Net Loss to Sales %
- % Variation in PY Sales
- % Variation in PY Profit
+ Particulars "."FY ".$bfRow['financial_year']."";}?>
+
-
-
-
-
-
-
-
-
-
-
+ Sales / Revenue (Rs) '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']).'';}?>
+
+ Net Profit / (Net Loss) (Rs) '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']).'';}else{ echo '('.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']).') '; } }?>
+
+ Net Profit or (Net Loss) to Sales % '.$bfRow['financial_margin_of_profit'].' %';}else { echo '('.$bfRow['financial_margin_of_loss'].' %) '; } }?>
+
+ % () in Sales over PY
+ = 0 ? ''.$bfRow['sale_variation'].' % ' : '('.$bfRow['sale_variation'].' %) ';
+ }else { echo 'NA ';}?>
+
-
-
-
-
-
-
- 0){ ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ % () in Net Profit over PY
+ = 0 ? ''.$bfRow['profit_variation'].' % ' :'('.$bfRow['profit_variation'].') ';
+ }else
+ {echo 'NA ';} }?>
+
+ % () in Net Profit % over PY
+ = 0 ? ''.$bfRow['financial_profit_to_sale_variation'].' % ' : '('.$bfRow['financial_profit_to_sale_variation'].' %) ';
+ }else { echo 'NA ';}}?>
-
+
+
+
+ 0){
+ //print_r($iterateFinance['customer_statements']);die();
+ ?>
+
+
+
+
+ Particulars Range provided Final Considered
+
+ From To
+
+
+
+
+ Sales / Revenue (Rs)
+
+
+ Net Profit or (Net Loss) to Sales % >
+
+
+ Net Profit / (Net Loss) (Rs) >>>> >
+
+
+
+
+ Sales / Revenue (Rs)
+
+
+
+ Net Profit or (Net Loss) to Sales (Rs) >
+
+
+ Net Profit / (Net Loss)% >>>> >
+
+
+
+
+
+
+
+
+
+
+ Working Capital Cycle:
+
+ S.No Particulars Days
+
+ 1 Debtor Days
+ 2 Creditor Days
+ 3 Stock Days
+
+
+
+ Working Capital Facilities:
+
+
+ S.No Facility Type Facility Details
+
+ $facility){
+
+ echo ' '.(++$fk) .' '.$facility['name'].' '.$facility['details'].'
+
+
+ The Loan Applicants have not availed any Working Capital Facilities from any financial institution";} ?>
+
Financial information is not available.
-
-
+
+
+
+
-
+ 0){
+ $getEachValues['is_od_cc'] = null;
+ foreach($businessBankRow['banking_details'] as $bd){ if($bd['account_type']== 4 || $bd['account_type']== 3){ $getEachValues['is_od_cc'] = true; } }
+ $getEachValues['bankDetails']=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
+ $bankingResult = array_merge($bankingResult,$getEachValues);
+
+ }
+
+ ?>
+
+ 0){ ?>
+
+ Business Banking:
+
+
+
+ Account Name
+ Bank Name
+ Account Type
+ Account Vintage
+
+ OD/CC Limit(Rs)
+
+ Main Business AC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
$cRow) {
- $clientRow = json_decode($cRow['processed_json'],true);
+ //global $client_first_row;
+ $client_first_row = '';
+ $client_second_row = '';
+ $client_third_row = '';
+ $client_fourth_row = '';
+ $client_fifth_row = '';
+ $client_sixth_row = '';
+ $client_seventh_row = '';
+ $to_no_of_clients = 0;
+ $done_on_credit = 0;
+ $name_of_the_company = '';
+ $cRow = $pd_processed_forms[2][$business_count];
+ $clientRow = json_decode($cRow['processed_json'],true);
+
+ $name_of_the_company = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
+ // $bindEachResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
+ // $getmanufacturing = array();
+ // $getTrading=array();
+ // $getService=array();
+ //$getTotalPaymentsPercentonCredit=array();
+ $client_first_row = '1 Product / Service ';
+ $client_second_row = '2 Contact Person ';
+ $client_third_row = '3 Mobile Number ';
+ $client_fourth_row = '4 Landline No ';
+ $client_fifth_row = '5 Payment Terms ';
+ $client_sixth_row = '6 Payment Mode ';
+ $client_seventh_row = '7 No of Days Credit ';
- $bindEachResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
- $getmanufacturing = array();
- $getTrading=array();
- $getService=array();
- $getTotalPaymentsPercentonCredit=array();
+
+ // this is for manufacturing
if(array_key_exists('manufacturing_details',$clientRow)){
+
+ $done_on_credit += $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
+
foreach($clientRow['manufacturing_details'] as $manuRow){
+
if(isset($manuRow['main_raw_materials'])){
- $getmanufacturing = array_map(function($tag) {
- return array(
- 'product' => $tag['manufacturing_product_name'],
- 'client_name' => $tag['manufacturing_client_name'],
- 'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
- 'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
- 'contact_person_name' => $tag['manufacturing_contact_person_name'],
- 'contact_person_mobile_number' => $tag['manufacturing_contact_person_mobile_number'],
- 'payment_type_master' => array_key_exists('manufacturing_payment_type_master',$tag) ? $tag['manufacturing_payment_type_master'] : '',
-
- );
- }, $manuRow['main_raw_materials']);
- array_push($getTotalPaymentsPercentonCredit,$manuRow['main_raw_materials_total_payments_percent_on_credit']);
+
+ $to_no_of_clients += count($manuRow['main_raw_materials']);
+
+ foreach($manuRow['main_raw_materials'] as $main_raw_material_key => $main_raw_material)
+ {
+ //print_r($main_raw_material);
+ $client_first_row .= ''.$main_raw_material['manufacturing_product_name'].' ';
+
+ $client_second_row .= $main_raw_material['person_title_name_master'] ? '' . $main_raw_material['person_title_name_master']: ' ' . '';
+ $client_second_row .= $main_raw_material['manufacturing_contact_person_name'] ;
+
+ $client_second_row .= isset($main_raw_material['person_designation']) && $main_raw_material['person_designation']== 1 ? ' '.$main_raw_material['other_person_designation'] : ' ';//
+
+ $client_second_row .= isset($main_raw_material['person_designation_master']) ? $main_raw_material['person_designation_master'] : '' ;
+
+ $client_second_row .= ' '.$main_raw_material['manufacturing_client_name'].' ';
+
+ $client_third_row .= ''. $main_raw_material['manufacturing_contact_person_mobile_number'] .' ';
+
+ $client_fourth_row .= $main_raw_material['person_stdcode'] && $main_raw_material['person_landline'] ? ''. $main_raw_material['person_stdcode'].' '.$main_raw_material['person_landline'].' ' : ''.'Not Provided'.' ';
+
+ $client_fifth_row .= $main_raw_material['manufacturing_payment_type_master'] ? ''. $main_raw_material['manufacturing_payment_type_master'] .' ' : 'NA ';
+
+ $client_sixth_row .= $main_raw_material['manufacturing_payment_mode'] ? ''. $main_raw_material['manufacturing_payment_mode'] .' ' : 'NA ';;
+
+ $client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? ''. $main_raw_material['manufacturing_credit_days_from'].' to '. $main_raw_material['manufacturing_credit_days_to'].' days'.' ' :' NIL ' ;
+
+ }
}
}
}
+
+
// this is for trading
if(array_key_exists('trade_details',$clientRow)){
+ $done_on_credit += $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
foreach($clientRow['trade_details'] as $tradeRow){
if(isset($tradeRow['trading_products'])){
- $getTrading = array_map(function($tag) {
- return array(
- 'product' => $tag['trade_product_name'],
- 'client_name' => $tag['trade_client_name'],
- 'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
- 'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
- 'contact_person_name' => $tag['trade_product_contact_person_name'],
- 'contact_person_mobile_number' => $tag['trade_product_contact_person_mobile_number'],
- 'payment_type_master' => array_key_exists('trade_product_payment_type_master',$tag) ? $tag['trade_product_payment_type_master'] :'',
-
- );
- }, $tradeRow['trading_products']);
- array_push($getTotalPaymentsPercentonCredit,$tradeRow['trading_products_total_payments_percent_on_credit']);
-
+ $to_no_of_clients += count($tradeRow['trading_products']);
+
+ foreach($tradeRow['trading_products'] as $trading_product_key => $trading_product)
+ {
+
+ $client_first_row .= ''.$trading_product['trade_product_name'].' ';
+
+ $client_second_row .= $trading_product['person_title_name_master'] ? '' . $trading_product['person_title_name_master']: ' ' . '';
+ $client_second_row .= $trading_product['trade_product_contact_person_name'] ;
+
+ $client_second_row .= isset($trading_product['person_designation']) && $trading_product['person_designation']== 1 ? ' '.$trading_product['other_person_designation'] : ' ';//
+
+ $client_second_row .= isset($trading_product['person_designation_master']) ? $trading_product['person_designation_master'] : '' ;
+
+ $client_second_row .= ' '.$trading_product['trade_client_name'].' ';
+
+ $client_third_row .= ''. $trading_product['trade_product_contact_person_mobile_number'] .' ';
+
+ $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? ''. $trading_product['person_stdcode'].' '.$trading_product['person_landline'].' ' : ''.'Not Provided'.' ';
+
+ $client_fifth_row .= $trading_product['trade_product_payment_type_master'] ? ''. $trading_product['trade_product_payment_type_master'] .' ' : 'NA ';
+
+ $client_sixth_row .= $trading_product['trade_product_payment_mode'] ? ''. $trading_product['trade_product_payment_mode'] .' ' : 'NA ';;
+
+ $client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to']? ''. $trading_product['trade_product_credit_days_from'].' to '. $trading_product['trade_product_credit_days_to'].' days'.' ' :' NIL ' ;
+
+ }
+
+
}
}
}
//this is for service
if(array_key_exists('service_provider_details',$clientRow)){
+
+ $done_on_credit += $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'];
+
foreach($clientRow['service_provider_details'] as $serviceRow){
if(isset($serviceRow['service_products'])){
- $getService = array_map(function($tag) {
- return array(
- 'product' => $tag['service_provider_product_name'],
- 'client_name' => $tag['service_provider_client_name'],
- 'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
- 'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
- 'contact_person_name' => $tag['service_provider_product_contact_person_name'],
- 'contact_person_mobile_number' => $tag['service_provider_product_contact_person_mobile_number'],
- 'payment_type_master' => array_key_exists('service_provider_product_payment_type_master',$tag) ? $tag['service_provider_product_payment_type_master'] :'',
-
- );
- }, $serviceRow['service_products']);
- array_push($getTotalPaymentsPercentonCredit,$serviceRow['service_products_total_payments_percent_on_credit']);
+ $to_no_of_clients += count($serviceRow['service_products']);
+ foreach($serviceRow['service_products'] as $service_product_key => $service_product)
+ {
+
+ $client_first_row .= ''.$service_product['service_provider_product_name'].' ';
+
+ $client_second_row .= $service_product['person_title_name_master'] ? '' . $service_product['person_title_name_master']: ' ' . '';
+ $client_second_row .= $service_product['service_provider_product_contact_person_name'] ;
+
+ $client_second_row .= isset($service_product['person_designation']) && $service_product['person_designation']== 1 ? ' '.$service_product['other_person_designation'] : ' ';//
+
+ $client_second_row .= isset($service_product['person_designation_master']) ? $service_product['person_designation_master'] : '' ;
+
+ $client_second_row .= ' '.$service_product['service_provider_client_name'].' ';
+
+ $client_third_row .= ''. $service_product['service_provider_product_contact_person_mobile_number'] .' ';
+
+ $client_fourth_row .= $service_product['person_stdcode'] && $service_product['person_landline'] ? ''. $service_product['person_stdcode'].' '.$service_product['person_landline'].' ' : ''.'Not Provided'.' ';
+
+ $client_fifth_row .= $service_product['service_provider_product_payment_type_master'] ? ''. $service_product['service_provider_product_payment_type_master'] .' ' : 'NA ';
+
+ $client_sixth_row .= $service_product['service_provider_product_payment_mode'] ? ''. $service_product['service_provider_product_payment_mode'] .' ' : 'NA ';
+
+ $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to']? ''. $service_product['service_provider_product_credit_days_from'].' to '. $service_product['service_provider_product_credit_days_to'].' days'.' ' :' NIL ' ;
+
+ }
}
}
}
- $bindEachResult["details"]=array_merge($getmanufacturing,$getTrading,$getService);
- $bindEachResult['total_payments_percent_on_credit'] = $getTotalPaymentsPercentonCredit;
- array_push($clientResult,$bindEachResult);
- }
+
+
+ $client_first_row .= ' ';
+ $client_second_row .= '';
+ $client_third_row .= '';
+ $client_fourth_row .= '';
+ $client_fifth_row .= '';
+ $client_sixth_row .= '';
+ $client_seventh_row .= '';
?>
- Client Details
+
0 )
+ {
+ echo "Client Details ";
+
?>
-
+
-
+
- Product/Service
- Client
- Contact
- Payment
+ Sr.No
+ Particulars
+ Client $i";
+ }?>
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ Out of total sales done by ".$name_of_the_company .", ".$done_on_credit."% is done on credit."; }?>
+
+
+
-
+
+
+
$row) {
- $clientRow = json_decode($row['processed_json'],true);
- $bindEachResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
- $getmanufacturing = array();
- $getTrading=array();
- $getTotalPaymentsPercentonCredit=array();
- foreach($clientRow['manufacturing_details'] as $manuRow){
+ $supplier_details = $pd_processed_forms[1][$business_count];
+ $supplierRow = json_decode($supplier_details['processed_json'],true);
+ //print_r($supplierRow);
+ $company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
+ $total_no_of_suppliers = count($supplierRow['manufacturing_details']);
+ $total_payments_percent_on_credit_for_supplier = 0;
+
+
+ foreach($supplierRow['manufacturing_details'] as $manuRow){
+ $total_payments_percent_on_credit_for_supplier = $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
if(isset($manuRow['main_raw_materials'])){
- $getmanufacturing = array_map(function($tag) {
- return array(
- 'product' => $tag['manufacturing_raw_material_name'],
- 'supplier_name' => $tag['manufacturing_supplier_name'],
- 'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
- 'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
- 'contact_person_name' => $tag['manufacturing_contact_person_name'],
- 'contact_person_mobile_number' => $tag['manufacturing_contact_person_mobile_number'],
- 'payment_type_master' => $tag['manufacturing_payment_type_master'],
-
- );
- }, $manuRow['main_raw_materials']);
- array_push($getTotalPaymentsPercentonCredit,$manuRow['main_raw_materials_total_payments_percent_on_credit']);
+
+ foreach($manuRow['main_raw_materials'] as $raw){
+
+ $temp['supplier_first_row'] = '1 Item Purchased '.''.$raw['manufacturing_raw_material_name'].' ';
+
+ $supplier_second_row = '2 Contact Person ';
+
+ $supplier_second_row .= $raw['person_title_name_master'] ? '' . $raw['person_title_name_master']: ' ' . '';
+ $supplier_second_row .= $raw['manufacturing_contact_person_name'] ;
+
+ $supplier_second_row .= isset($raw['person_designation']) && $raw['person_designation']== 1 ? ' '.$raw['other_person_designation'] : ' ';//
+
+ $supplier_second_row .= isset($raw['person_designation_master']) ? $raw['person_designation_master'] : '' ;
+
+ $supplier_second_row .= ' '.$raw['manufacturing_supplier_name'].' ';
+ $temp['supplier_second_row'] = $supplier_second_row.' ';
+
+ $temp['supplier_third_row'] = '3 Mobile Number '.''. $raw['manufacturing_contact_person_mobile_number'] .' ';
+
+ $temp['supplier_fourth_row'] = '4 Landline No ';
+
+ $temp['supplier_fourth_row'] .= $raw['person_stdcode'] && $raw['person_landline'] ? ''. $raw['person_stdcode'].' '.$raw['person_landline'].' ' : ''.'Not Provided'.' ';
+
+ $temp['supplier_fifth_row'] = '5 Payment Terms ';
+
+ $temp['supplier_fifth_row'] .= $raw['manufacturing_payment_type_master'] ? ''. $raw['manufacturing_payment_type_master'] .' ' : 'NA ';
+
+ $temp['supplier_sixth_row'] = '6 Payment Mode ';
+
+ $temp['supplier_sixth_row'] .= $raw['manufacturing_payment_mode'] ? ''. $raw['manufacturing_payment_mode'] .' ' : 'NA ';
+
+ $temp['supplier_seventh_row'] = '7 No of Days Credit ';
+
+ $temp['supplier_seventh_row'] .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? ''. $raw['manufacturing_credit_days_from'].' to '. $raw['manufacturing_credit_days_to'].' days ' : 'NA ';
+ array_push($supplierResult,$temp);
+
+ }
}
}
// this is for trading
- foreach($clientRow['trade_details'] as $tradeRow){
+ foreach(isset($clientRow['trade_details']) && $clientRow['trade_details'] as $tradeRow){
- if(isset($tradeRow['trading_products'])){
-
- $getTrading = array_map(function($tag) {
- return array(
- 'product' => $tag['trade_product_name'],
- 'supplier_name' => $tag['trade_supplier_name'],
- 'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
- 'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
- 'contact_person_name' => $tag['trade_product_contact_person_name'],
- 'contact_person_mobile_number' => $tag['trade_product_contact_person_mobile_number'],
- 'payment_type_master' => array_key_exists('trade_product_payment_type_master',$tag) ? $tag['trade_product_payment_type_master'] :'',
-
- );
- }, $tradeRow['trading_products']);
- array_push($getTotalPaymentsPercentonCredit,$tradeRow['trading_products_total_payments_percent_on_credit']);
-
- }
+
+ $total_payments_percent_on_credit_for_supplier = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
+
+ if(isset($tradeRow['trading_products'])){
+
+
+ foreach($tradeRow['trading_products'] as $trade){
+
+ $temp['supplier_first_row'] = '1 Item Purchased '.''.$trade['trade_product_name'].' ';
+
+ $supplier_second_row = '2 Contact Person ';
+
+ $supplier_second_row .= $trade['person_title_name_master'] ? '' . $trade['person_title_name_master']: ' ' . '';
+ $supplier_second_row .= $trade['trade_product_contact_person_name'] ;
+
+ $supplier_second_row .= isset($trade['person_designation']) && $trade['person_designation']== 1 ? ' '.$trade['other_person_designation'] : ' ';//
+
+ $supplier_second_row .= isset($trade['person_designation_master']) ? $trade['person_designation_master'] : '' ;
+
+ $supplier_second_row .= ' '.$trade['trade_supplier_name'].' ';
+ $temp['supplier_second_row'] = $supplier_second_row.' ';
+
+ $temp['supplier_third_row'] = '3 Mobile Number '.''. $trade['trade_product_contact_person_mobile_number'] .' ';
+
+ $temp['supplier_fourth_row'] = '4 Landline No ';
+
+ $temp['supplier_fourth_row'] .= $trade['person_stdcode'] && $trade['person_landline'] ? ''. $trade['person_stdcode'].' '.$trade['person_landline'].' ' : ''.'Not Provided'.' ';
+
+ $temp['supplier_fifth_row'] = '5 Payment Terms ';
+
+ $temp['supplier_fifth_row'] .= $trade['trade_product_payment_type_master'] ? ''. $trade['trade_product_payment_type_master'] .' ' : 'NA ';
+
+ $temp['supplier_sixth_row'] = '6 Payment Mode ';
+
+ $temp['supplier_sixth_row'] .= $trade['trade_product_payment_mode'] ? ''. $trade['trade_product_payment_mode'] .' ' : 'NA ';
+
+ $temp['supplier_seventh_row'] = '7 No of Days Credit ';
+
+ $temp['supplier_seventh_row'] .= $trade['trade_product_credit_days_from'] && $trade['trade_product_credit_days_to'] ? ''. $trade['trade_product_credit_days_from'].' to '. $trade['trade_product_credit_days_to'].' days ' : 'NA ';
+ array_push($supplierResult,$temp);
+
+ }
+ }
+
}
- $bindEachResult["details"]=array_merge($getmanufacturing,$getTrading);
- $bindEachResult['total_payments_percent_on_credit'] = $getTotalPaymentsPercentonCredit;
- array_push($supplierResult,$bindEachResult);
- }
+
+ if(count($supplierResult))
+ {
?>
Supplier Details
$fetchRow){
+ echo ' Supplier '.($k+1).':';
?>
-
-
+
+
- Raw Material/Trading
- Supplier
- Contact
- Payment
+ Sr.No
+ Particulars
+ Details
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+ 0)
+ {
+ echo "Have to make payment of about ". $total_payments_percent_on_credit_for_supplier ." % in advance rest on delivery.
";
+ }
+
+ }?>
+
+
+
-
+
$stRow) {
+ $stRow = $pd_processed_forms[11][$business_count];
$stockRow = json_decode($stRow['processed_json'],true);
- $bindStockResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
+ //print_r($stockRow);die();
+ $is_stock_sufficient_enough = $stockRow['is_sufficiant_finished_and_traded_goods'];
+ $is_raw_materials_sufficient_enough = null;
+ $bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details
- if(count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) > 0 || count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0){
+ if(count($stockRow['manufacturing_details'] && (count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) > 0 || count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0))){
+
+ $is_raw_materials_sufficient_enough = $stockRow['manufacturing_details'][0]['is_sufficiant_raw'];
$bindStockResult["manufacturing"]=Stockform::getStockManufacturingDetails($stockRow['manufacturing_details'][0]['manufacturing_raw_materials'], $stockRow['manufacturing_details'][0]['manufacturing_finished_goods']);
+ //print_r($bindStockResult["manufacturing"]);
}
else {
$bindStockResult["manufacturing"]=array();
@@ -1006,180 +2010,458 @@ defined('BASEPATH') OR exit('No direct script access allowed');
else {
$bindStockResult["wholesale"]=array();
}
- array_push($stockResult,$bindStockResult);
- }
+
+ count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult;
+
+ //print_r($stockResult);die();
?>
+
Stock Details
- 0){ ?>
+
0) { ?>
- The Manufacturing stock details are as under :
-
+
+
- Type
- Name
- Qty
- UOM
- Value
- Details
+ Sr.No
+ Type of Stock
+ Stock Item
+ Stock Value (Rs)
+ Stock Quantity
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
0) { ?>
- The Retail trading stock details are as under :
-
-
-
- Name
- Qty
- UOM
- Value
- Details
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
0) { ?>
- The Wholesale trading stock details are as under :
-
-
-
- Name
- Qty
- UOM
- Value
- Details
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
- Stock details is not available.
-
-
-
-
- $baRow) {
- $businessAssetRow = json_decode($baRow['processed_json'],true);
- $bindBusinessAsset["company_name"] ='Assets used for ';
- $bindBusinessAsset["company_name"] .=MYUITIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
- $bindBusinessAsset["company_name"] .=' Business :';
- if(count($businessAssetRow['business_assets_details'])>0){
- $bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
- }
- array_push($businessAssetResult,$bindBusinessAsset);
- }
- ?>
- Asset Details
- 0){ ?>
-
-
-
-
-
- Asset
- Owned By
- Details
- Market Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Business asset is not available.
-
-
+ if(!strcasecmp($is_stock_sufficient_enough,'yes')){
+ echo 'Considering the size of operations, the stock of goods maintained is sufficient as per the PD Officer’s observations.
';
+ }else if(!strcasecmp($is_stock_sufficient_enough,'no')){
+ echo 'Considering the size of operations, the stock of goods maintained is not sufficient as per the PD Officer’s observations.
';
+ }
+ if(!strcasecmp($is_raw_materials_sufficient_enough,'yes'))
+ {
+ echo 'Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.
';
+ }else if(!strcasecmp($is_raw_materials_sufficient_enough,'no'))
+ {
+ echo 'Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.
';
+ }
+ $stock_photo_count = $pd_images[11];
+ //echo count($stock_photo_count);
+
+ $stock_img_row_count = ceil(count($stock_photo_count) / 5);
+ //echo $stock_img_row_count;
+ if(count($stock_photo_count)){
+ echo ' ';
+ echo 'Stock Photograph`s :
';
+ echo ' ';
+ echo '';
+ //echo '';
+
+ // echo '';
+ // foreach($stock_photo_count as $stock)
+ // {
+ // echo $stock['pd_document_title'];
+ // echo '
';
+ // echo ' ';
-
+ // }
+ //echo '';
+ for($img_row = 1; $img_row <= $stock_img_row_count; $img_row++)
+ {
+
+ echo '
';
+ $from = $img_row == 1 ? $img_row : ($img_row+4);
+ $to = ($from + 4);
+ for($stock_photo_iter = $from; $stock_photo_iter <= $to;$stock_photo_iter++)
+ {
+
+ if(isset($stock_photo_count[$stock_photo_iter]) &&$stock_photo_count[$stock_photo_iter]['company_id'] == ($business_count+1))
+ {
+ echo '';
+ echo '';
+ echo '
';
+ echo '
'.$stock_photo_count[$stock_photo_iter]['pd_document_title'].'
';
+ echo '
';
+ echo ' ';
+ //unset($stock_photo_count[$stock_photo_iter]);
+ }
+
+ }
+ //echo " ";
+ echo ' ';
+ }
+ //echo '
';
+ echo '
';
+ }
+ //die();
+ ?>
+
+
+
+
+
+
+
+
+ Assessed Income - ".MYUTIL::findCompanyName($all_company_details,($business_count+1),1)."";
+
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1)
+ {
+ echo 'As per person met, the following Purchase details were shared:
';
+ }
+ else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ echo 'As per person met, Purchase details were not shared, income calculated by Net magin percentage.
';
+ }
+
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 1)
+ {
+ echo 'Itemwise Purchase Details :
';
+
+ echo '';
+ echo '';
+ echo ' Raw Material/Trading Item Purchase Quantity UOM Rate/Unit of Purchase Frequency Annual Purchase(Rs) ';
+ echo ' ';
+
+ echo '';
+ foreach($ai_core_details_processed['purchase_to_display'] as $dat)
+ {
+ echo ' '.$dat['material_name'] .' '.$dat['qty'] .' '.$dat['uom'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['rate']) .' '.$dat['frequency'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['annual_value']) .' ';
+ }
+ echo ' ';
+
+ echo '
';
+
+ }
+ else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 &&$ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 2)
+ {
+ echo 'Billwise Purchase Details :
';
+ foreach($ai_core_details_processed['purchase_to_display'] as $billwise)
+ {
+ echo '';
+ echo 'Item name :
' . $billwise['item_name'].' ';
+ echo '
'.$billwise['month_count'].' month(s) purchase value :
'.MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value']).' Annual Purchase value:
'. MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value'] * (12 / $billwise['month_count']) ).' ';
+ echo '
';
+ foreach($billwise['months'] as $month_data)
+ {
+ //echo '
';
+ echo ' ';
+ echo '';
+ echo '';
+ echo ' '.$month_data['month_to_dispaly'].' ';
+ echo ' Date Value ';
+ echo ' ';
+
+ echo '';
+ foreach($month_data['month_data'] as $month)
+ {
+ echo ' '.$month['date'] .' '.$month['value'] .' ';
+ }
+ echo ' ';
+
+ echo '
';
+ //echo ' ';
+ }
+ echo '
';
+
+ }
+ }
+
+ }
+ echo '';
+ if(isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer']))
+ {
+ $str = 'As per person met, '.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']).' ( '.MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']).' ) declared as annual sale value.';
+ if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
+ {
+ $str .= ' Also '.$rupee_symbol.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']).' ( '.MYUTIL::numtowords( $ai_core_details['sales_declared_by_customer'][0]['margin_value']).' )'.'( '.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'% sales declared ) as net margin amount.';
+ }
+
+ echo $str;
+ echo '
';
+ }
+ //die();
+ if(isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise']))
+ {
+ echo 'Sales Itemwise :
';
+ echo '';
+ echo '';
+ echo $ai_core_details_processed['sales_calculated_by_itemwise_header'];
+ echo ' ';
+ echo '';
+ foreach($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid)
+ {
+ echo '';
+ echo ''.$sid['sale_item'].' '.$sid['sales_qty'].' '.$sid['uom'].' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['rate_per_unit']).' '.$sid['frequency'].' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['annual_sale_value']).' ';
+ if(isset($sid['margin_per'])){echo ''.$sid['margin_per'].' '; }
+ if(isset($sid['margin_per_uom'])){echo ''.$sid['margin_per_uom'].' '; }
+ if(isset($sid['margin_final_value'])){echo ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['margin_final_value']).' '; }
+
+ echo ' ';
+ }
+ echo ' ';
+ echo '
';
+ }
+
+
+ if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise']))
+ {
+ echo " ";
+ echo "Kuchha Sales Book/Bills :
";
+ foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise)
+ {
+ // if($sale_month_wise['sales_type'] == 1)
+ // {
+ echo '';
+ echo 'Item name :
' . $sale_month_wise['sales_item'].' ';
+ if($sale_month_wise['sales_type'] == 1)
+ {
+ echo '
'.$sale_month_wise['month_count'].' month purchase value :
'.$rupee_symbol.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Purchase value:
'.$rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).' ';
+ }
+ else
+ {
+ echo 'Annual Purchase value:
'. $rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).' ';
+ }
+ echo '
';
+ foreach($sale_month_wise['months'] as $sale_month_data)
+ {
+ //echo '
';
+ echo ' ';
+ echo '';
+ echo '';
+ if($sale_month_wise['sales_type'] == 1)
+ {
+ echo ' '.$sale_month_data['month_to_dispaly'].' ';
+ }
+ if($sale_month_wise['sales_type'] == 1)
+ {
+ echo ' Date Value ';
+ }else if($sale_month_wise['sales_type'] == 2)
+ {
+ echo ' Frequncy Value ';
+ }
+ echo ' ';
+
+ echo '';
+ foreach($sale_month_data['month_data'] as $month)
+ {
+ if($sale_month_wise['sales_type'] == 1)
+ {
+ echo ' '.$month['date'] .' '.$month['value'] .' ';
+ }
+ else if($sale_month_wise['sales_type'] == 2)
+ {
+ echo ' '.$month['frequency_name'] .' '.$month['frequency_value'] .' ';
+ }
+ }
+ echo ' ';
+
+ echo '
';
+ //echo ' ';
+ }
+ echo '
';
+
+ //}
+ }
+ }
+
+
+ if(isset($ai_core_details) && count($ai_core_details['business_expenses']))
+ {
+ echo 'Business Expenses Details :
';
+ echo '';
+ echo '';
+ echo ' Business Expense Amount Frequency Annual Expenses ';
+ echo ' ';
+ echo '';
+ foreach($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp)
+ {
+ echo ' '.$b_exp['expense_item'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($b_exp['expense_value']) .' '.$b_exp['frequency_name'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($b_exp['annual_expenses_value']).' ';
+ }
+ echo ' ';
+ echo '
';
+ }
+
+ if(isset($ai_core_details) && count($ai_core_details['house_hold_expenses']))
+ {
+ echo 'Household Expenses Details :
';
+ echo '';
+ echo '';
+ echo ' Expense Particulars Amount (Rs) Frequency Annual Expenses(Rs) ';
+ echo ' ';
+ echo '';
+ foreach($ai_core_details_processed['household_expenses_to_diaplay'] as $h_exp)
+ {
+ echo ' '.$h_exp['expense_item'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($h_exp['expense_value']) .' '.$h_exp['frequency_name'] .' '.$rupee_symbol.MYUTIL::customIndianNumberFormat($h_exp['annual_expense_value']) .' ';
+ }
+ echo ' ';
+ echo '
';
+ }
+
+
+ if(isset($ai_core_details) && count($ai_summary_details_processed))
+ {
+ echo 'The Summary of Income :
';
+ echo '';
+ echo '';
+ echo $ai_summary_details_processed['ai_table_header_row'];
+ echo ' ';
+ echo '';
+ echo $ai_summary_details_processed['sale_revenue_row'];
+ echo $ai_summary_details_processed['purchase_row'];
+ echo $ai_summary_details_processed['gross_profit_loss_row'];
+ echo $ai_summary_details_processed['business_expense_row'];
+ echo $ai_summary_details_processed['net_profit_loss_row'];
+ echo $ai_summary_details_processed['house_hold_expense_row'];
+ echo $ai_summary_details_processed['disposable_income_row'];
+ echo $ai_summary_details_processed['net_margin_row'];
+
+ echo ' ';
+ echo '
';
+
+ echo ' ';
+ echo '';
+ echo '';
+ echo ' Particulars Details ';
+ echo ' ';
+ echo '';
+ echo $ai_summary_details_processed['considered_sales_revenue_row'];
+ echo $ai_summary_details_processed['considered_net_profit_row'];
+ echo $ai_summary_details_processed['considered_net_margint_row'];
+ echo ' ';
+ echo '
';
+ }
+ echo "
";
+ //die();
+ ?>
+
+
+
+
+
+
+
+
+
+ $oaRow) {
$otherAssetRow = json_decode($oaRow['processed_json'],true);
+ //print_r($otherAssetRow);die();
+ //echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";
if(count($otherAssetRow['assets_details'])>0){
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
+
+ //print_r($otherAssetResult);die();
}
}
?>
Personal Assets
- 0){ ?>
-
+ 0){ ?>
+
- Asset
- Owned By
- Details
- Market Value
+ Sr.No
+ Asset Type
+ Asset Description
+ Asset Owned By
+ Approx Market Value(Rs)
+ Purchase Year
+ Loan Again Assest
- $paRow){
?>
-
-
-
-
+
+
+
+
+ '. $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']); ?>
+
+
@@ -1189,205 +2471,164 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Personal asset is not available.
-
-
- $iRow) {
- $otherIcomeRow = json_decode($iRow['processed_json'],true);
- if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
- $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
- }
- }
- ?>
- Other Income Details
- 0){ ?>
- The below mentioned other source of income were shared :
-
-
-
- Income Type
- Amount
- Frequency
-
-
-
-
-
-
-
-
-
-
-
-
-
- Other source of income is not available.
-
-
-
-
-
+
$ibRow) {
$individualBankRow = json_decode($ibRow['processed_json'],true);
+ //print_r($individualBankRow);
if(count($individualBankRow['banking_details'])>0){
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
}
}
- // business banking
- foreach($pd_processed_forms[21] as $rowKey=> $bbRow) {
- $businessBankRow = json_decode($bbRow['processed_json'],true);
- if(count($businessBankRow['banking_details'])>0){
- $getEachValues=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
- $bankingResult = array_merge($bankingResult,$getEachValues);
-
- }
- }
+
+
+ ?>
+ Personal Banking:
+ 0){
+ //print_r($bankingResult);
?>
- Banking Details
- 0){ ?>
Below bank account details were shared :
-
+
- Account Name
+ Sr.No
+ Account Holder's Name
Bank Name
Account Type
- Main Business Account
+
OD / CC Limit
Vintage
- $bdRow){
?>
+
-
-
-
+
+
+
-
- Bank account details is not available.
+
-
-
-
- $elRow) {
- $otherLoanRow = json_decode($elRow['processed_json'],true);
- if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
- $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
- }
- }
- ?>
- Other Financial Information
- 0){ ?>
- The below current loan obligations were shared :
-
+
+
+
+
+
+ $iRow) {
+ $otherIcomeRow = json_decode($iRow['processed_json'],true);
+ // print_r($otherIcomeRow);
+ // echo "@@@@@@@@@@@@@@@@@@@@@";
+ if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
+ $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
+ }
+ }
+ ?>
+
+ 0){
+ //print_r($otherIncomeResult);
+ ?>
+ Other Sources of Income of Individual Loan Applicants:
+
+
- Loan Type
- Amount
- Loan Taken From
- Installment
-
- Tenure
- (Original - Current = Elapsed)
-
- Loan taken by
+ Sr.No
+ Income Source
+ Earned by
+ Amount(Rs)
- $oiRow){
?>
-
-
-
-
-
-
-
-
+
+
+
+
+
- Current loan obligations is not available.
+ As per the loan applicants met by PD officer, they do not have any other source of Income.
-
-
+
+
+
$fRow) {
$familyRow = json_decode($fRow['processed_json'],true);
+ //print_r($familyRow);die();
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
}
}
?>
- Other Family Details
- 0){ ?>
- $fmValue) { ?>
-
-
-
-
- Address of Residence
-
-
-
- No.of Years Residing here
-
-
-
- Ownership
-
-
-
- No.of Family Members
-
-
-
-
- Family of
-
+
+ 0){
+ //print_r($familyResult);die();
+ ?>
+ Family Information:
+ $fmValue) { ?>
+
+ ";echo $residence_text;
+
+ ?>
+
+
+ The table below provides details of other family members of
+
+ Sr.No
Name
Relation
Age
Earning Status
+ Occupation Details
- $fmRow){
?>
+
+
@@ -1397,37 +2638,406 @@ defined('BASEPATH') OR exit('No direct script access allowed');
else{?>
Other Family Members is not available.
-
+
-
- $nrcRow) {
- $neighbourRefRow = json_decode($nrcRow['processed_json'],true);
- if(strtoupper($neighbourRefRow['check_type'])==0 && count($neighbourRefRow['neighbourhood_list'])>0){
- $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($neighbourRefRow['neighbourhood_list'],$pd_master_details[0]);
- }
- else if(strtoupper($neighbourRefRow['check_type'])==1 && count($neighbourRefRow['referencecheck_list'])>0){
- $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
+
+
+
+ $elRow) {
+ $otherLoanRow = json_decode($elRow['processed_json'],true);
+ //print_r($otherLoanRow);die();
+ $total_no_of_data = 0;
+ if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
+ $total_no_of_data = count($otherLoanRow['loan_details']);
+ $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
}
}
?>
+ 0){
+ //print_r($existLoanResult);die();
+
+ ?>
+ Existing Loan Obligation
+
+ The table below lists the details of Existing Loan Obligations of the Loan Applicants.
+
+
+
+ Particulars
+ Loan $header";}?>
+
+
+
+
+
+
+
+
+ As per loan applicant he doesn’t have any existing obligations
+
+
+
+
+
+
+
+
+
+
+ $nrcRow) {
+ $neighbourRefRow = json_decode($nrcRow['processed_json'],true);
+ //print_r($neighbourRefRow);
+ //die();
+ if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){
+ $pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status'];
+ if(count($neighbourRefRow['neighbourhood_list'])>0){
+ $company_name = MYUTIL::findCompanyName($all_company_details,1,1);
+
+ $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0]);
+ }
+ }
+ // if(&& count($neighbourRefRow['referencecheck_list'])>0){
+ // $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
+ // }
+ }
+ ?>
Neighbourhood / Reference Check
- 0){ ?>
-
-
-
-
-
+ 0){
+ //print_r($existNeighRefCheck);die();
+ ?>
+
+ $nfValue) {
+
+ echo ' Neighbour '.(++$nkey);
+ ?>
+
+
+
+
+
+
+
+ Neighbourhood Check Status is
+
+
+
+
+
- Neighbourhood / Reference Check is not available.
+ Neighbour Check was not possible due to Could not verify
+
-
+
+
+
+
+ PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS
+
+
+
+ Customer Behaviour:
+
+
+
+ ✔';
+ ?>
+
+
+
+ Polite
+
+
+ Rude
+
+
+
+ Others mentioned as below
+
+
+
+
+
+
+
+ Suitability of Business Location:
+
+
+
+
+
+ Well Suited
+
+
+ Fairly Suited
+
+
+
+ Not Suited
+
+
+
+
+
+ PD Officer’s overall assessment:
+
+
+
+
+
+ Positive
+
+
+ Refer to Credit
+
+
+
+ Negative
+
+
+
+
+ Others
+
+
+
+
+
+
+
+
+
+
+ PD officer recommendation is '.$fo_diplay.'';?>. The following key points were considered while arriving at the aforementioned status.
+ "; foreach($final_remark_data['recommendation_positive'] as $pos){ echo "".$pos['reason_for_positive']." ";}
+
+ }else if($negative){ echo ""; foreach($final_remark_data['recommendation_negative'] as $neg){ echo "".$neg['reason_for_negative']." ";}
+ }
+ else if($refer_to_credit){ echo ""; foreach($final_remark_data['recommendation_positive'] as $rtc){ echo "".$rtc['reason_for_refer_to_credit']." ";}
+ }
+ echo " ";
+ ?>
+ ".$other_command_remark."";} ?>
+
+
+
-
+
+
+
+
+ Details Score Card Section" ;
+ // *** General Section Questions Score Table
+ echo '';
+ echo " General Questions L1(". $pd_score['general']['otp_done']['l1_weightage']."%) L2 Answer Score Attributed Score Max Score ";
+ foreach($pd_score['general'] as $key => $general)
+ {
+
+ $question = MYUTIL::findQuestionByKey($score_questions_display,$key);
+ $span = '('.$general['l1_weightage'].'% * '. $general['l2_weightage'].'% * '.$general['score_band'].') ';
+ $max_span = '('.$general['l1_weightage'].'% * '. $general['l2_weightage'].'% * '.$general['max_score_band'].') ';
+ echo ''.''.$question.' '.$general['l2_weightage'] .'% '.$general['answer'].
+ ' '.$general['score_band'].' '.$general['attributed_score'].' '.$span.' '.$general['max_score'].' '.$max_span.' ';
+ }
+
+ echo ' General Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['general']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['general']['max_score'],2,'.',',').' ';
+ echo '
';
+
+ echo ' ';
+
+
+ // *** Asset Caculation Score Table
+ echo '';
+ echo " Asset Value Calculaitons ";
+
+ echo " Actual Value Of Assets (a) ". number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'],2,'.',',')." ";
+
+ echo " Loan Amount (b) ". number_format($pd_score['score_summary']['asset_calculation_details']['loan_amount'],2,'.',',')." ";
+
+ echo " Avg Expected Value Of Assets (c) ". round($pd_score['score_summary']['asset_calculation_details']['avg_expected_value_of_assets'],2)."% ";
+
+ echo " Expected Value Of Assets (d = c*b) ". number_format($pd_score['score_summary']['asset_calculation_details']['expected_value_of_assets'],2,'.',',')." ";
+
+ echo " Actual Value Of Assets Percentage (e = (a/b) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets_percentage'],2)."% ";
+
+ echo " Variance (f = ((e-c)/c) * 100) ". round($pd_score['score_summary']['asset_calculation_details']['variance'],2)."% ";
+
+ echo " Score As per Grid ". round($pd_score['score_summary']['asset_calculation_details']['score'],2)." ";
+
+
+
+ echo '
';
+
+ echo ' ';
+ // *** Final Remarks Questions Score Table
+ echo '';
+ echo " Final Remarks Questions L1(". $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage']."%) L2 Answer Score Attributed Score Max Score ";
+ foreach($pd_score['final_remarks'] as $key => $final_remark)
+ {
+ $question = MYUTIL::findQuestionByKey($score_questions_display,$key);
+
+ $span = '('.$final_remark['l1_weightage'].'% * '. $final_remark['l2_weightage'].'% * '.$final_remark['score_band'].') ';
+
+ $max_span = '('.$final_remark['l1_weightage'].'% * '. $final_remark['l2_weightage'].'% * '.$final_remark['max_score_band'].') ';
+
+ echo ''.''.$question.' '.$final_remark['l2_weightage'].'% '.$final_remark['answer'].' '.$final_remark['score_band'].' '.$final_remark['attributed_score'].' '.$span.' '.$final_remark['max_score'].' '.$max_span.' ';
+ }
+
+ echo ' Final Remarks Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['final_remarks']['max_score'],2,'.',',').' ';
+ echo '
';
+ echo ' ';
+
+ //print_r($pd_score['business']);
+ echo '';
+
+ // *** Business Section Questions Score Table
+ echo " Business Questions L1(". $pd_score['business']['no_of_years_business_run']['l1_weightage']."%) L2 Answer Score Attributed Score Max Score ";
+ $certificates = array();
+ foreach($pd_score['business'] as $key => $business)
+ {
+
+ $question = MYUTIL::findQuestionByKey($score_questions_display,$key);
+ $span = '('.$business['l1_weightage'].'% * '. $business['l2_weightage'].'% * '.$business['score_band'].') ';
+ $max_span = '('.$business['l1_weightage'].'% * '. $business['l2_weightage'].'% * '.$business['max_score_band'].') ';
+ if($key != 'cerificates')
+ {
+ echo ''.''.$question.' '.$business['l2_weightage'].'% '.$business['answer'].' '.$business['score_band'].' '.$business['attributed_score'].' '.$span.' '.$business['max_score'].' '.$max_span.' ';
+ }
+
+ if($key == 'cerificates')
+ {
+ $certificates = $business;
+ echo ''.' Certificates '.round($business['l2_weightage'],2).'% '.'Refer Cert Table'.' '.$business['score_band'].' '.$business['attributed_score'].' '.$business['max_score'].' ';
+ }
+
+ }
+
+ echo ' Business Section Sum of Attributed Score | Sum of Max Score '.number_format($pd_score['score_summary']['business']['actual_score'],2,'.',',').' '.number_format($pd_score['score_summary']['business']['max_score'],2,'.',',').' ';
+ echo '
';
+
+
+ // *** Business Certificates Score Table
+ echo '
';
+
+ echo ' ';
+
+ echo "";
+ echo " Business Certificates Answer Score Attributed Score Max Score ";
+ $index = 0;
+ // print_r($certificates);
+ foreach($certificates as $key => $cerificate)
+ {
+ $index++;
+ if($index <=7)
+ {
+ $question = MYUTIL::findQuestionByKey($score_questions_display,$key);
+ $span = '('.$cerificate['l1_weightage'].'% * '. $cerificate['l2_weightage'].'% * '.$cerificate['score_band'].') ';
+
+ $max_span = '('.$cerificate['l1_weightage'].'% * '. $cerificate['l2_weightage'].'% * '.$cerificate['max_score_band'].') ';
+
+ echo ''.''.$question.' '.$cerificate['answer'].' '.$cerificate['score_band'].' '.round($cerificate['attributed_score'],3).' '.$span.' '.round($cerificate['max_score'],3).' '.$max_span.' ';
+ }
+ }
+ echo "";
+ }
+// ########################### End Of Score Card Section #########################################
+ ?>
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/api/application/views/report_templates/chart.png b/api/application/views/report_templates/chart.png
index 370e3ec1..7952421f 100644
Binary files a/api/application/views/report_templates/chart.png and b/api/application/views/report_templates/chart.png differ
diff --git a/api/application/views/report_templates/dsc_business.png b/api/application/views/report_templates/dsc_business.png
index 0c5441fe..bddd1740 100644
Binary files a/api/application/views/report_templates/dsc_business.png and b/api/application/views/report_templates/dsc_business.png differ
diff --git a/api/application/views/report_templates/dsc_general.png b/api/application/views/report_templates/dsc_general.png
index 9fcefa2a..41578c30 100644
Binary files a/api/application/views/report_templates/dsc_general.png and b/api/application/views/report_templates/dsc_general.png differ
diff --git a/api/application/views/report_templates/pdscorechart.html b/api/application/views/report_templates/pdscorechart.html
index 5b382fb8..7ff16d74 100644
--- a/api/application/views/report_templates/pdscorechart.html
+++ b/api/application/views/report_templates/pdscorechart.html
@@ -34,9 +34,9 @@
- 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: {
diff --git a/api/application/views/welcome_message.php b/api/application/views/welcome_message.php
index 8cdfcf46..09bbf726 100644
--- a/api/application/views/welcome_message.php
+++ b/api/application/views/welcome_message.php
@@ -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;
?>
PDSCORE CHART
@@ -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 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: [], // starting value
backgroundColor: 'black',
- indicator: [10, 1, 20, 10, 0.24],
+ indicator: [10, 1, 20, 50, 0.24],
animation: {
effect: 1,
method: 1,