diff --git a/api/application/config/autoload.php b/api/application/config/autoload.php
index 10e276c3..24025f75 100644
--- a/api/application/config/autoload.php
+++ b/api/application/config/autoload.php
@@ -89,7 +89,7 @@ $autoload['drivers'] = array();
|
| $autoload['helper'] = array('url', 'file');
*/
-$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber','vendor_form','custom_encryption','readexceldata');
+$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber','vendor_form','custom_encryption','readexceldata','loanform');
/*
| -------------------------------------------------------------------
diff --git a/api/application/config/constants.php b/api/application/config/constants.php
index cebeac80..d8994241 100644
--- a/api/application/config/constants.php
+++ b/api/application/config/constants.php
@@ -99,7 +99,7 @@ defined('SAVEROOMINFO_API') OR define('SAVEROOMINFO_API', 'saveRoomInfo')
defined('SAVESMCCREDITPDIMAGE_API') OR define('SAVESMCCREDITPDIMAGE_API', 'saveSMCCreditPDImage'); // no errors
defined('GETSMCPDIMGSECTIONDATA_API') OR define('GETSMCPDIMGSECTIONDATA_API', 'getSMCPDImgSectionData'); // no errors
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN','getFullPDDetails'); // no errors
-
+defined('CAMUNDA_URL') OR define('CAMUNDA_URL','http://34.121.71.79:8080/engine-rest/');
/*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
if(ENVIRONMENT == 'development')
diff --git a/api/application/config/routes.php b/api/application/config/routes.php
index 752d890e..2507b561 100644
--- a/api/application/config/routes.php
+++ b/api/application/config/routes.php
@@ -302,6 +302,7 @@ $route['filterSalesPDList']='Sales_PD_Controller/filterSalesPDList';
$route['generateSatelliteImg']='Sales_PD_Controller/generateSatelliteImg';
$route['getSalesPDImgDataCusLink']='Sales_PD_Controller/getSalesPDImgDataCusLink';
$route['sendSalesCusLinkViaSMS']='Sales_PD_Controller/sendSalesCusLinkViaSMS';
+$route['camundaTest']='Sales_PD_Controller/camundaTest';
$route['listSMCCreditPD/(:num)']='SMC_Credit_PD_Controller/listSMCCreditPD';
diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 24685713..21dd90dd 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -1023,7 +1023,7 @@ class PD_Controller extends REST_Controller {
$pd_details['is_cus_link_disabled'] = 1;
}
- if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == TRIGGERED || $pd_details['pd_status'] == INITIATED))
+ if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == TRIGGERED || $pd_details['pd_status'] == INITIATED || $pd_details['pd_status'] == INPROGRESS))
{
/***********************CHOOSE PD TEMPALATE*********************/
@@ -6079,6 +6079,8 @@ public function getPDFormDetailsJSON_post()
public function codeigniterViewTest_post()
{
+ // echo "i am here";
+ // exit();
// $host = getenv('DB_HOST');
// echo $this->config->item('new_db_variable');
// echo MY_CONSTANT;
@@ -6139,7 +6141,8 @@ public function getPDFormDetailsJSON_post()
{
mkdir($this->external_path.'/pd_reports/'.$pdid,0761);
}
-
+ // echo "finally";
+// exit();
// $this->load->helper('DIFFCHECK');
// $old_version = $this->external_path.'/pd_reports/'.$pdid.'/a.html';
@@ -6231,7 +6234,7 @@ public function getPDFormDetailsJSON_post()
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
- print_r($data['pd_master_details']);die();
+ // print_r($data['pd_master_details']);die();
//$data['satellite_path'] = $this->external_path.'/pd_reports/'. $pdid .'/satellite.png';
// $data['pd_master_details'][0]['lender_short_name'] = 'CLIXH';
// $data['pd_master_details'][0]['product_abbr'] = 'HL';
@@ -8415,9 +8418,13 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
function getLatestPDReportHTMLFile($pdid,$random_string,$return_type = false)
{
+ // echo "now i am in child function ";
+ // exit();
if(($pdid != null || $pdid != "")) //&& (strlen($pdid) == 16) &&(is_string($pdid)))
{
$pd_data = $this->PD_Model->selectCustomRecords(array('pd_id','pd_report_html_filename'),array('random_string' => $random_string,'pd_id' => $pdid),PDTRIGGER);
+
+ // print_r($pd_data);exit();
if(count($pd_data))
{
@@ -8431,6 +8438,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
}
file_put_contents($temp_file_path,$report_data);
$view_name = 'pd_reports/'. $pd_data[0]['pd_id'] .'/temp.html';
+ // echo $view_name;
+ // die();
return $this->load->view($view_name,array(),$return_type);
@@ -11019,15 +11028,28 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
if(!empty($_FILES['video_file']))
{
$folder_to_check = XLPATH.'/pd_reports/'.$records['fk_pd_id'].'/videos';
+
+ if(!file_exists($folder_to_check))
+ {
+ mkdir($folder_to_check,0777);
+ }
+ // die();
// $modified_fname = $records['rand_key'].'~'.str_replace(' ','_',($_FILES['pd_excel_data']['name']));
$modified_fname = str_replace(' ','_',($_FILES['video_file']['name']));
// echo file_exists($folder_to_check);die();
$config = array('upload_path' => $folder_to_check,'overwrite' => TRUE,'allowed_types' => '*','file_name' => $modified_fname);
+
$this->load->library('upload', $config);
+ $this->upload->initialize($config);
+
+
+ try {
+
+
if($this->upload->do_upload('video_file'))
{
-
+ log_message('ERROR','video uplaod done :' . $folder_to_check);
$sourcefile = $folder_to_check.'/'.$modified_fname;
// echo $sourcefile;
$key = 'pd'.$records['fk_pd_id'].'/video/'.$modified_fname;
@@ -11043,6 +11065,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
unlink($sourcefile);
}
}
+ else
+ {
+ log_message('ERROR','video uplaod failed :' . $folder_to_check);
+ }
+
+ } catch (Exception $e) {
+ log_message('ERROR','video uplaod failed exception:' . $folder_to_check.' - '.$e->getMessage());
+ }
// die();
if($is_bucket_upload_sucess && $id)
@@ -11124,14 +11154,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
if($user_details['data'][0]['user_role'] == 26)//Credit Manager
{
//get RCM and allocate to RCM
- $rcm = $this->SMC_Credit_PD_Model->getSMCFlowUsers($existing_pd_details[0]['fk_city'],27);
+ $rcm = $this->SMC_Credit_PD_Model->getSMCFlowUsers($existing_pd_details[0]['fk_state'],27);
if(count($rcm))
{
$pd_details['fk_pd_allocated_to'] = $rcm[0]['userid'];
}
else
{
- log_message('ERROR',('### Couldnot find RCM users in BOUNCED status - '.$existing_pd_details[0]['fk_city']));
+ log_message('ERROR',('### Couldnot find RCM users in BOUNCED status - '.$existing_pd_details[0]['fk_state']));
}
diff --git a/api/application/controllers/SMC_Credit_PD_Controller.php b/api/application/controllers/SMC_Credit_PD_Controller.php
index 8dbf9ee8..c8d41b40 100644
--- a/api/application/controllers/SMC_Credit_PD_Controller.php
+++ b/api/application/controllers/SMC_Credit_PD_Controller.php
@@ -1575,7 +1575,7 @@ public function filterSalesPDList_post() {
// print_r($view_data);
// 25 "product_abbr": "NBFC/MFI",
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
- $html_content = $this->load->view('smc_creditpd_reports/MWISE2',$view_data,true);
+ $html_content = $this->load->view('smc_creditpd_reports/NBFC',$view_data,true);
}else{
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
}
diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php
index 4188926b..0b93d7aa 100644
--- a/api/application/controllers/Sales_PD_Controller.php
+++ b/api/application/controllers/Sales_PD_Controller.php
@@ -9,6 +9,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
require_once APPPATH . '/libraries/REST_Controller.php';
+include_once APPPATH.'/vendor/autoload.php';
class Sales_PD_Controller extends REST_Controller {
@@ -22,6 +23,7 @@ class Sales_PD_Controller extends REST_Controller {
$this->load->library('AWS_S3');
$this->load->library('pdfgenerator');
$this->load->helper('satellite_image');
+ $this->load->helper('camunda');
$this->load->library('phpmailer_library');
@@ -549,6 +551,9 @@ class Sales_PD_Controller extends REST_Controller {
$records['sales_pd_sno'] = $salepd_serial_no;
// print_r($records);die();
$id = $this->Sales_PD_Model->saveRecords($records,SALES_PD_DATA);
+
+ //start camunda process
+ CAMUNDA::startSalesPDInstance($id);
}
else
{
@@ -659,6 +664,8 @@ class Sales_PD_Controller extends REST_Controller {
//echo 'final';die();
$id = $this->Sales_PD_Model->updateRecords($records,SALES_PD_DATA,array('sales_pd_id' => $records['sales_pd_id']));
+ CAMUNDA::completeSalesPDTask($id);
+
$this->prepareSalesPDReport($records['sales_pd_id'],false);
sleep(10);
log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['sales_pd_id']);
@@ -1191,6 +1198,15 @@ public function filterSalesPDList_post() {
}
}
+
+
+ public function camundaTest_post()
+ {
+ // echo 'hi';
+
+ CAMUNDA::completeSalesPDTask(1);
+ //CAMUNDA::startSalesPDInstance(1);
+ }
}
\ No newline at end of file
diff --git a/api/application/helpers/camunda_helper.php b/api/application/helpers/camunda_helper.php
new file mode 100644
index 00000000..3eab8ad3
--- /dev/null
+++ b/api/application/helpers/camunda_helper.php
@@ -0,0 +1,154 @@
+post( $url, [
+ 'headers' => ['Content-Type' => 'application/json']
+ //'body' => json_encode($data)
+ ]);
+
+ if($response && $response->getStatusCode() == 200)
+ {
+ return (json_decode(($response->getBody()->getContents())));
+ // echo $response->getBody()->getContents()->id;
+ // echo $response->getBody()->getContents()['id'];
+ // die();
+ }
+ else
+ {
+ return null;
+ }
+ } catch (Exception $e) {
+ //return null;
+ echo $e->getMessage();
+ }
+ }
+
+ // complete an activity in an instance or instance
+ public static function completeInstance($instanceID,$data = array())
+ {
+ $url = CAMUNDA_URL.'task/'.$instanceID.'/complete';
+ $client = new \GuzzleHttp\Client();
+ $response = $client->post( $url, [
+ 'headers' => ['Content-Type' => 'application/json']
+ //'body' => json_encode($data)
+ ]);
+
+ if($response && $response->getStatusCode() == 200)
+ {
+ return json_encode($response->getBody()->getContents());
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ public static function getListOfInstanceByProcessDefinitionKey($processDefinitionKey,$data = array())
+ {
+ $url = CAMUNDA_URL . 'task?processDefinitionKey='.$processDefinitionKey;
+ // echo $url;//die();
+
+ $client = new \GuzzleHttp\Client();
+ $response = $client->request('GET',$url);
+
+ // $client = new \GuzzleHttp\Client();
+ // $res = $client->get( $url, [
+ // 'headers' => ['Content-Type' => 'application/json'],
+ // 'body' => json_encode($data)
+ // ]);
+ if($response && $response->getStatusCode() == 200)
+ {
+ return json_decode($response->getBody()->getContents());
+ }
+ else
+ {
+ return null;
+ }
+ // print_r();
+ // print_r($response->getStatusCode());
+ }
+
+
+ public static function startSalesPDInstance($sales_pd_id)
+ {
+
+ $CI =& get_instance();
+ if($sales_pd_id)
+ {
+ $newProcessInstanceID = SELF::startNewInstance('sales_pd_demo:1:38949d25-8c83-11eb-a4f2-42010a800002');
+ if($newProcessInstanceID && property_exists($newProcessInstanceID, 'id'))
+ {
+ $updated = $CI->Sales_PD_Model->updateRecords(array('t_process_instance_id' => $newProcessInstanceID->id),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id));
+ log_message('ERROR','####Camunda start new instance success - ', $sales_pd_id);
+ }
+ else
+ {
+ log_message('ERROR','####Camunda start new instance failed - ', $sales_pd_id);
+ }
+ }
+ }
+
+
+ public static function completeSalesPDTask($sales_pd_id)//completeSalesPDTask ot instance
+ {
+
+ $CI =& get_instance();
+ if($sales_pd_id)
+ {
+ $fields=array('t_process_instance_id');
+ $sales_pd_data = $CI->Sales_PD_Model->selectCustomRecords($fields,array('sales_pd_id' => $sales_pd_id),SALES_PD_DATA);
+
+ if($sales_pd_data && count($sales_pd_data))
+ {
+ //get list of task
+ $task_id = null;
+ $list_of_task = SELF::getListOfInstanceByProcessDefinitionKey('sales_pd_demo');
+ if($list_of_task && count($list_of_task))
+ {
+ foreach ($list_of_task as $task_key => $task)
+ {
+ if($sales_pd_data[0]['t_process_instance_id'] == $task->processInstanceId)
+ {
+ $task_id = $task->id;
+ break;
+ }
+ }
+ }
+ else
+ {
+ log_message('ERROR','####Couldn`t identify Camunda instance - ', $sales_pd_id);
+ }
+
+
+ if($task_id)
+ {
+ SELF::completeInstance($task_id);
+ }
+ else
+ {
+ log_message('ERROR','####Couldn`t identify task id - ', $sales_pd_id);
+ }
+ }
+ else
+ {
+ log_message('ERROR','#### could not get sales pd data - ', $sales_pd_id);
+ }
+ }
+ }
+
+
+}
+
+?>
\ No newline at end of file
diff --git a/api/application/helpers/loanform_helper.php b/api/application/helpers/loanform_helper.php
new file mode 100644
index 00000000..a92ed141
--- /dev/null
+++ b/api/application/helpers/loanform_helper.php
@@ -0,0 +1,84 @@
+₹";
+ $facility_amt = MYUTIL::customIndianNumberFormat($loan_form['facility_amount']);
+ $monthly_business_anchor_amt = MYUTIL::customIndianNumberFormat($loan_form['monthly_business_anchor']);
+ $average_invoicevalue_amt = MYUTIL::customIndianNumberFormat($loan_form['average_invoicevalue']);
+ $stock_related_amt = MYUTIL::customIndianNumberFormat($loan_form['stock_related_anchor']);
+
+ // $facility_amt = $loan_form['facility_amount'];
+ // $monthly_business_anchor_amt = $loan_form['monthly_business_anchor'];
+ // $average_invoicevalue_amt = $loan_form['average_invoicevalue'];
+ // $stock_related_amt = $loan_form['stock_related_anchor'];
+
+ $payment_mechanism_arr = array('bill_wise' => 'Bill Wise','open_account' => 'Open Account');
+ $sales_low_months=SELF::getMonths($loan_form['sales_low_months']);
+
+ // if($loan_form['vintage_anchor_year'] > 1 ){ $yr = $loan_form['vintage_anchor_year']."Yrs";}
+ // else if($loan_form['vintage_anchor_year'] == 1 ){ $yr = $loan_form['vintage_anchor_year']."Yr"; }
+ // else{ $yr = ''; }
+
+ // if($loan_form['vintage_anchor_month'] > 1 ){ $mnt = $loan_form['vintage_anchor_month']."Months";}
+ // else if($loan_form['vintage_anchor_month'] == 1 ){ $mnt = $loan_form['vintage_anchor_month']."Month"; }
+ // else{ $mnt = ''; }
+
+ // if($mnt != '' && $yr != '' ){ $yrandmnt = $yr.' and '.$mnt; }
+ // else if($mnt == '' && $yr != ''){ $yrandmnt = $yr; }
+ // else if($mnt != '' && $yr == ''){ $yrandmnt = $mnt; }
+ // else{ $yrandmnt = '-';}
+
+ $anchor_details_display[] = array('particulars' => "Facility Amount Applied For (".$rupee_symbol.")",'details' => $rupee_symbol." ".$facility_amt.' ('.MYUTIL::numtowords($loan_form['facility_amount']).')');
+ $anchor_details_display[] = array('particulars' => "Name of Anchor",'details' => $loan_form['anchor_name']);
+ $anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Year",'details' => $loan_form['vintage_anchor_year']);
+ $anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Month",'details' => $loan_form['vintage_anchor_month']);
+ // $anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Year and Month",'details' => $yrandmnt );
+ $anchor_details_display[] = array('particulars' => "Monthly business (sale/purchase) with the Anchor (".$rupee_symbol.")",'details' => $rupee_symbol." ".$monthly_business_anchor_amt.' ('.MYUTIL::numtowords($loan_form['monthly_business_anchor']).')');
+ $anchor_details_display[] = array('particulars' => "Business concentration with Anchor",'details' => $loan_form['business_concentration'].' %');
+ $anchor_details_display[] = array('particulars' => "Credit period with the Anchor (Days)",'details' => $loan_form['credit_period_days']);
+ $anchor_details_display[] = array('particulars' => "Payment Mechanism",
+ 'details' => $payment_mechanism_arr[$loan_form['payment_mechanism']]);
+ $anchor_details_display[] = array('particulars' => "Average Invoice Value (".$rupee_symbol.")",'details' => $rupee_symbol." ".$average_invoicevalue_amt.' ('.MYUTIL::numtowords($loan_form['average_invoicevalue']).')');
+ $anchor_details_display[] = array('particulars' => "Are there peak seasons for the business with Anchor",'details' => ucfirst($loan_form['peakseasons_anchor']));
+ if($loan_form['peakseasons_anchor']=='yes')
+ {
+ $anchor_details_display[] = array('particulars' => "Months in which sales/service is low?",'details' => $sales_low_months );
+ $anchor_details_display[] = array('particulars' => "Comments",'details' => $loan_form['peak_season_comment'] );
+ }
+ $anchor_details_display[] = array('particulars' => "Are there debit/credit notes being issued to/by Anchor",'details' => ucfirst($loan_form['anchor_notes']));
+ if($loan_form['anchor_notes']=='yes'){
+ $anchor_details_display[] = array('particulars' => "Reason for such debit/credit notes",'details' => ucfirst($loan_form['debitcredit_notes']) );
+ }
+ $anchor_details_display[] = array('particulars' => "Value of stock related to Anchor (".$rupee_symbol.")",'details' => $rupee_symbol." ".$stock_related_amt.' ('.MYUTIL::numtowords($loan_form['stock_related_anchor']).')');
+ $anchor_details_display[] = array('particulars' => "Observations on Sample Invoices",'details' => $loan_form['sample_invoices'] );
+ return $anchor_details_display;
+ // print_r($anchor_details_display);
+}
+
+ public static function getMonths($details) {
+ foreach($details as $key=>$value){
+ $getRow=$getRow;
+ $getRow .= ($key==0) ? "":($key==count($details)-1 ? ' and ' : ",");
+ switch($value) {
+ case 1:$getRow .='January';break;
+ case 2:$getRow .='February';break;
+ case 3:$getRow .='March';break;
+ case 4:$getRow .='April';break;
+ case 5:$getRow .='May';break;
+ case 6:$getRow .='June';break;
+ case 7:$getRow .='July';break;
+ case 8:$getRow .='August';break;
+ case 9:$getRow .='September';break;
+ case 10:$getRow .='October';break;
+ case 11:$getRow .='November';break;
+ case 12:$getRow .='December';break;
+ }
+ }
+ return $getRow;
+ }
+
+
+}
+?>
\ No newline at end of file
diff --git a/api/application/models/Dash_Board_Model.php b/api/application/models/Dash_Board_Model.php
index c5f50cd9..c411fad1 100644
--- a/api/application/models/Dash_Board_Model.php
+++ b/api/application/models/Dash_Board_Model.php
@@ -26,11 +26,12 @@ class Dash_Board_Model extends SPARQ_Model {
public function getDetailsOfPDType($fdate,$tdate,$cityarr,$lenderarr)
{
+ $smc_lender_id = (ENVIRONMENT == 'production' ? 7 : 35)
if(($lenderarr != "" || $lenderarr != null)&& ($cityarr != "" || $cityarr != null) && ($fdate && $tdate != '')){
- $sql_query = "SELECT if(fk_pd_type = 1,'FULL',if(fk_pd_type = 2,'SMART',if(fk_pd_type = 3,'TELE','NULL'))) as PDTYPE,pd_status,count(*) as count FROM t_pd_triggered where MONTH(createdon) = MONTH(CURDATE()) group by fk_pd_type,pd_status;";
+ $sql_query = "SELECT if(fk_pd_type = 1,'FULL',if(fk_pd_type = 2,'SMART',if(fk_pd_type = 3,'TELE','NULL'))) as PDTYPE,pd_status,count(*) as count FROM t_pd_triggered where MONTH(createdon) = MONTH(CURDATE()) AND fk_lender_id != $smc_lender_id group by fk_pd_type,pd_status;";
}
else{
- $sql_query = "SELECT if(fk_pd_type = 1,'FULL',if(fk_pd_type = 2,'SMART',if(fk_pd_type = 3,'TELE','NULL'))) as PDTYPE,pd_status,count(*) as count FROM t_pd_triggered where ";
+ $sql_query = "SELECT if(fk_pd_type = 1,'FULL',if(fk_pd_type = 2,'SMART',if(fk_pd_type = 3,'TELE','NULL'))) as PDTYPE,pd_status,count(*) as count FROM t_pd_triggered where fk_lender_id != $smc_lender_id AND";
if($lenderarr != "")
{
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index 38df5af6..087ba757 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -278,6 +278,10 @@ class PD_Model extends SPARQ_Model {
{
$this->db->WHERE_IN('PDTRIGGER.fk_lender_id',$pd_lender);
}
+ else
+ {
+ $this->db->WHERE('PDTRIGGER.fk_lender_id != ',(ENVIRONMENT == 'production' ? 7 : 35));
+ }
if($pd_applicant_lender_ref != "" || $pd_applicant_lender_ref != null )
{
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
index 764242ae..a52e9603 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
@@ -1308,11 +1308,10 @@ if ( isset($pdf) ) {
$loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution );
}
}
-
- if($pd_master_details[0]['lender_short_name'] != 'UDAAN' || $pd_master_details[0]['lender_short_name'] != 'CFPL')
- {
- $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0? ($rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')') : "Not Provided" );
- }
+ if(!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL')){
+
+ $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0? ($rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')') : "Not Provided" );
+ }
if(!$is_current_product_bl && !$is_current_product_laep)
{
@@ -1371,6 +1370,23 @@ if ( isset($pdf) ) {
//
echo " ".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+
+ S.No Particulars Particular Details
+
+ $row)
+ {
+ echo ' '.($row_key + 1)." ".$row['particulars']." ".$row['details'] ." ";
+ }
+ ?>
+
+
+
@@ -2217,6 +2233,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
+ case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
+ break;
+ case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
+ break;
+ case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
+ break;
+ case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
+ break;
+ case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
+ break;
+ case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
+ break;
}
}
}
@@ -2225,8 +2253,14 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
-
- array_push($businessFinancialResult,$bindBusinessFinancial);
+ if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
+ }
+ array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@@ -2294,19 +2328,19 @@ if($total_no_of_business > 0) {
' . $comments_on_financials . '
';
-
+
}
}
else { if($pd_master_details[0]['fk_pd_type'] == 1) { echo "Financial statements not provided by ".$loan_word." Applicants to PD officer.
";} }
+ // if($pd_master_details[0]['lender_short_name'] != 'CFPL' ) {}
?>
0){
@@ -2463,7 +2497,27 @@ if($total_no_of_business > 0) {
echo ' Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
- Working Capital Cycle:
+
+
+
+ S.No Particulars Details
+
+ $facility){
+ echo ' '.(++$fk) .' '.$facility['name'].' '.$facility['details'].' ';
+ }?>
+
+
+
+
+
S.No Particulars Days
@@ -2475,18 +2529,18 @@ if($total_no_of_business > 0) {
- 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.";}
+ The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.
";}
}
?>
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
index 8e6a9bcb..5ebac9b7 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
@@ -1306,7 +1306,7 @@ if ( isset($pdf) ) {
}
}
- if($pd_master_details[0]['lender_short_name'] != 'UDAAN' || $pd_master_details[0]['lender_short_name'] != 'CFPL')
+ if(!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL'))
{
$loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0? ($rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')') : "Not Provided" );
}
@@ -1368,6 +1368,23 @@ if ( isset($pdf) ) {
//
echo " ".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+
+ S.No Particulars Particular Details
+
+ $row)
+ {
+ echo ' '.($row_key + 1)." ".$row['particulars']." ".$row['details'] ." ";
+ }
+ ?>
+
+
+
@@ -2214,6 +2231,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
+ case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
+ break;
+ case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
+ break;
+ case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
+ break;
+ case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
+ break;
+ case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
+ break;
+ case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
+ break;
}
}
}
@@ -2222,7 +2251,13 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
-
+ if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
+ }
array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@@ -2460,7 +2495,27 @@ if($total_no_of_business > 0) {
echo ' Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
- Working Capital Cycle:
+
+
+
+ S.No Particulars Details
+
+ $facility){
+ echo ' '.(++$fk) .' '.$facility['name'].' '.$facility['details'].' ';
+ }?>
+
+
+
+
+
S.No Particulars Days
@@ -2472,7 +2527,7 @@ if($total_no_of_business > 0) {
- Working Capital Facilities:
+
S.No Facility Type Facility Details
@@ -2483,7 +2538,7 @@ if($total_no_of_business > 0) {
}?>
- The Loan Applicants have not availed any Working Capital Facilities from any financial institution.";}
+ The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.
";}
}
?>
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
index a9218d9d..cd76177c 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php
@@ -1312,8 +1312,8 @@ if ( isset($pdf) ) {
$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' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0? ($rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')') : "Not Provided" );
+ if(!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL')){
+ $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0? ($rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')') : "Not Provided" );}
if(!$is_current_product_bl && !$is_current_product_laep)
{
@@ -1372,6 +1372,23 @@ if ( isset($pdf) ) {
//
echo " ".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+
+ S.No Particulars Particular Details
+
+ $row)
+ {
+ echo ' '.($row_key + 1)." ".$row['particulars']." ".$row['details'] ." ";
+ }
+ ?>
+
+
+
@@ -2219,6 +2236,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
+ case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
+ break;
+ case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
+ break;
+ case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
+ break;
+ case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
+ break;
+ case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
+ break;
+ case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
+ break;
}
}
}
@@ -2227,7 +2256,13 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
-
+ if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
+ $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
+ }
array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@@ -2462,7 +2497,27 @@ if($total_no_of_business > 0) {
echo ' Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
- Working Capital Cycle:
+
+
+
+ S.No Particulars Details
+
+ $facility){
+ echo ' '.(++$fk) .' '.$facility['name'].' '.$facility['details'].' ';
+ }?>
+
+
+
+
+
S.No Particulars Days
@@ -2474,7 +2529,7 @@ if($total_no_of_business > 0) {
- Working Capital Facilities:
+
S.No Facility Type Facility Details
@@ -2485,7 +2540,7 @@ if($total_no_of_business > 0) {
}?>
- The Loan Applicants have not availed any Working Capital Facilities from any financial institution.";}
+ The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.
";}
}
?>
diff --git a/api/application/views/smc_creditpd_reports/NBFC.php b/api/application/views/smc_creditpd_reports/NBFC.php
new file mode 100644
index 00000000..3208f071
--- /dev/null
+++ b/api/application/views/smc_creditpd_reports/NBFC.php
@@ -0,0 +1,594 @@
+↑';
+ $downarrow = '↓ ';
+ $dash = ' ';
+ // $product_name = $master[0]['abbr'];
+ $rupee_symbol = "₹ ";
+ //print_r($master[0]['abbr']);die();
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Powered By PD Genie
+
+
+
+
+
+
+
+ Personal Discussion Sheet -
+
+
+ Application ID
+
+
+
+
+ Name of the Company/Firm
+
+
+
+
+
+
+ Name of Person Met During Visit and Contact Number
+
+
+
+
+
+
+
+
+
+
+ City
+
+ State
+
+ PIN
+
+
+ Actual PD Address '.$pd_section_data[2]['alternative_address'].' ';
+ }
+
+ $ownership_type = '';
+ if( isset($pd_section_data[8]['business_ownership_type']) && (strtolower($pd_section_data[8]['business_ownership_type'])) == 'owned')
+ {
+ $ownership_type = '( Owned )';
+ }
+ else if(isset($pd_section_data[8]['business_ownership_type']) && (strtolower($pd_section_data[8]['business_ownership_type'])) == 'rented')
+ {
+ $ownership_type = ' ( Rented ) - Rent paid '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[8]['business_monthly_rented_amt']);
+ }
+
+ echo ' Address Type / Ownership '.$pd_section_data[2]['address_type']['address_type'].$ownership_type.' ';
+ if(isset($pd_section_data[8]['is_business_address']) && strtolower($pd_section_data[8]['is_business_address']) == 'yes')
+ {
+ echo ' Period for which business has been in operation from this address '.($pd_section_data[8]['business_years'].' Year(s)'.(isset($pd_section_data[8]['business_months']) && $pd_section_data[8]['business_months'] != '' ? ' & ' . $pd_section_data[8]['business_months'] .' Month(s)': '')).' ';
+ }
+ echo ' PD locality '.$pd_section_data[2]['pd_locality']['locality_name'].' ';
+ echo ' Location Approach '.$pd_section_data[2]['pd_location']['description'].' ';
+ echo ' Comment On Locality '.$pd_section_data[2]['comment_locality']['rating'].' ';
+ echo ' Estimated Area of Business Premise '.$pd_section_data[2]['business_estimated_area'].' '.$pd_section_data[2]['uom'].' ';
+ }
+ ?>
+
+
+
+
+
+
+ Satellite Image of PD Location
+ GPS Coordinates of location where PD Visit was done :
+
+
+ Location access Not Available';}
+ ?>
+
+
+
+
+
+ General Section
+
+
+
+
+ Name Loan Amount Product Location
+
+ '.$pd_section_data['21']['name'].' '.$pd_section_data['21']['loan_amount'].' '.$pd_section_data['21']['product'].' '.$pd_section_data['21']['location'].' ';
+ }
+ else {
+ echo ' General Section Not Available ';
+ }
+ ?>
+
+
+
+
+
+Profile
+ History & Vintage and Lineage
+ '.$pd_section_data['22']['history_vintage'].'
+ Primary shareholding , promoters and major equity partners
+ '.$pd_section_data['22']['capital_details'].'
+ The capital structure and details of the various investments vehicles
+ '.$pd_section_data['22']['history_vintage'].'
';
+ }
+ else {
+ echo ' Profile Not Available
';
+ }
+ ?>
+
+
+ Size and Geographical Reach
+ AUM ( off book & on book ) &e. Trend of Disbursement in last 2 quarters
+ '.$pd_section_data['23']['aum_book'].'
+ States and geographical regions & Branches & geographical customer base
+ '.$pd_section_data['23']['geographical_details'].'
+ Branches /employees / structure
+ '.$pd_section_data['23']['branches_employees'].'
+ Portfolio concentration and Cuts to be discussed
+ '.$pd_section_data['23']['portfolio_concentration'].'
+ Who are the competitors to the business
+ '.$pd_section_data['23']['business_competitors'].'
+ Estimated Market Size of the Business& Market share
+ '.$pd_section_data['23']['estimated_market'].'
';
+ }
+ else {
+ echo ' Size and Geographical Reach Not Available
';
+ }
+ ?>
+
+
+
+
+Product & Processes
+ Products
+ '.$pd_section_data['24']['products'].'
+ Policies
+ '.$pd_section_data['24']['policies'].'
+ Credit appraisal mechanism
+ '.$pd_section_data['24']['credit_appraisal'].'
+ Technology and usage for acquisition and credit
+ '.$pd_section_data['24']['technology_credit'].'
+ Collection policy and mechanism -Collection efficiency trends in last 12 months (CC/CD, TC/CD,TC/TD) any deviation to be discussed in detail
+ '.$pd_section_data['24']['collection_policy'].'
+ Provisioning policy
+ '.$pd_section_data['24']['provisioning_policy'].'
+ Restructuring policy
+ '.$pd_section_data['24']['restructuring_policy'].'
+ Covid impact and policy
+ '.$pd_section_data['24']['covid_policy'].'
';
+ }else {
+ echo ' Product & Processes Not Available
';
+ }
+
+ ?>
+
+
+
+ Portfolio Health
+ Par own book /Par off book -d
+ '.$pd_section_data['25']['par_book'].'
+ NPAs/Provisioning & resolution strategy
+ '.$pd_section_data['25']['provisioning_resolution'].'
+ Strategy to manage flow as well as post moratorium stress
+ '.$pd_section_data['25']['post_morotorium'].'
+ Strategy for non-paying customers
+ '.$pd_section_data['25'][' non-paying_customers'].'
+ PAR (Productwise)/Net NPAs/Write offs Movement of Bucket ,PAR 90+
+ '.$pd_section_data['25']['par'].'
';
+
+ }
+ else {
+ echo ' Portfolio Health Not Available
';
+ }
+
+ ?>
+
+
+
+
+Total Overall Debt/Equity Profile
+ Types of debt structures and major debt providers
+ '.$pd_section_data['26']['dept_structures'].'
+ Future plan for additional funding
+ '.$pd_section_data['26']['future_plan'].'
+ Funding received during covid times including liquidity support from DFIs & Banks
+ '.$pd_section_data['26']['dfi_banks'].'
+ Fresh sanctions lined up in the present month and coming quarters
+ '.$pd_section_data['26']['fresh_sanctions'].'
';
+ }
+ else {
+ echo ' Total Overall Debt/Equity Profile Not Available
';
+ }
+ ?>
+
+
+
+
+
+
+ Financial analysis
+
+
+
+ CAR (Tier-1)/CAR (Tier-1 + Tier-2)
+ Leverage (D/E) (excluding Managed)
+ ALM
+ Opex
+ NIM (%) - as per Audited B/S
+ Opex (% of Avg. Book)
+
+ '.$pd_section_data['27']['car_type'].'
+ '.$pd_section_data['27']['leverage'].'
+ '.$pd_section_data['27']['alm'].'
+ '.$pd_section_data['27']['opex'].'
+ '.$pd_section_data['27']['nim'].'
+ '.$pd_section_data['27']['opex_average'].' ';?>
+
+ Opex (% of NII)
+ Return on Assets
+ Return on Equity
+ IRR (Derived)
+ Avg. Borrowing Cost (Derived)
+ Spread (Derived)
+
+
+ '.$pd_section_data['27']['opex_nii'].'
+ '.$pd_section_data['27']['return_asset'].'
+ '.$pd_section_data['27']['return_equity'].'
+ '.$pd_section_data['27']['irr'].'
+ '.$pd_section_data['27']['avg_borrowing'].'
+ '.$pd_section_data['27']['spread'].' ';
+ }
+ else {
+ echo ' Financial analysis Not Available ';
+ }
+
+ ?>
+
+
+
+
+Overall Plan of Action
+ Future plan on expansion geographies wise , products and regions . Equity and debt structuring as well as dilution in future. Target book for the present quarter and YOY projections
+ '.$pd_section_data['28']['future_plan'].'
';
+ }
+ else {
+ echo ' Overall Plan of Action Not Available
';
+ }
+ ?>
+
+
+
+Validation Points vide Systems and Books at HQ & Branches
+ Stock to be validated from system
+ '.$pd_section_data['29']['stock_validated'].'
+ Collateral coverage for existing borrowing ( System Mapping to be checked)
+ '.$pd_section_data['29']['collateral_coverage'].'
+ Collection efficiency and system flagging to be counterchecked and same with PAR cuts
+ '.$pd_section_data['29']['collection_efficiency'].'
+ Sample check of loan dox, application form along with PAN for Active loan accounts
+ '.$pd_section_data['29']['loan_dox'].'
+ Disbursement no to be checked from system
+ '.$pd_section_data['29']['disbursement'].'
+ Top 20 exposure to be checked with data submitted
+ '.$pd_section_data['29']['top20_exposure'].'
+ Sample Sanction letters to validate collateral cover stipulated for existing Borrowing
+ '.$pd_section_data['29']['sanction_letters'].'
+ Provisioning /Write-off/NPA flagging to be counter checked
+ '.$pd_section_data['29']['provisioning'].'
+ Restructuring of Loans in system on sample basis
+ '.$pd_section_data['29']['restructuring_loan'].'
+ EMI cycle date in system
+ '.$pd_section_data['29']['emi_date'].'
+ Cash and Bank ledger to be checked
+ '.$pd_section_data['29']['cash_checked'].'
+ Free FD details to be taken and validated from Accounting system
+ '.$pd_section_data['29']['fd_details'].'
+ Application/Systems used for Boarding /Loan management
+ '.$pd_section_data['29']['loan_management'].'
';
+ }
+ else {
+ echo ' Validation Points vide Systems and Books at HQ & Branches Not Available
';
+ }
+ ?>
+
+
+
+
+
+
+ Final Remarks of PD officer
+
+ 'Others','2' => 'Rude','3' => 'Polite');
+ $over_all = array('2' => 'Positive','3' => 'Negative');
+ ?>
+ Customer Behaviour
+ [Polite / Rude / Others (Please specify)]
+
+ PD Officer's overall assessment
+ (Positive / Negative)
+ $val)
+ { $reason .= ($key + 1).' '.$val['reason'].' '; }
+ ?>
+ PD Officer's key points considered while arriving at the aforementioned status
+ Remarks '.$pd_section_data[19]['final_form_remarks'] .' ';
+
+ } } else{
+ echo ' Final Remarks of PD officer Not Available ';
+ }?>
+
+ 'Selfie with person met','person_met_id_proof' => 'Person met ID Proof','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','supplier_image' => 'Supplier Bills','client_image' => 'Client Bills','machinary_image' => 'Machinary Image');
+ // if($master[0]['sales_pd_type'] == 2){ $photo_names['selfie_with_person_met'] = 'Selfie of the person contacted';}
+ // echo count($smc_images);die();
+ //print_r(array_keys($section9));die();
+ $tot_rows = ceil(count($smc_images) / 3);
+if(count($smc_images))
+ {
+ echo '
';
+ echo '';
+
+ $add_factor = 0;
+ for($row = 0;$row < $tot_rows; $row++)
+ {
+ echo '';
+
+ $from = $row == 0 ? $row : ($row+$add_factor);
+ $to = ($from + 2);
+ $add_factor = $add_factor + 2;
+ for($i = $from ; $i <= $to; $i++)
+ {
+
+ if(isset($smc_images[$i]))
+ {
+
+ echo ' '.$photo_names [ $smc_images[$i]['img_name'] ].' ';
+ }
+
+ //unset($p_key);
+ }
+ echo ' ';
+ }
+ echo '
';
+ }?>
+
+
+
+
+
+
+
+ Name of Credit Manager
+
+
+
+
+ Date of PD Visit
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file