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/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 24685713..09a53d64 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -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);
diff --git a/api/application/helpers/loanform_helper.php b/api/application/helpers/loanform_helper.php
new file mode 100644
index 00000000..8ab4eeb1
--- /dev/null
+++ b/api/application/helpers/loanform_helper.php
@@ -0,0 +1,85 @@
+ '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 (₹)",'details' => "₹"." ".$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 (₹)",'details' => "₹"." ".$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 (₹)",'details' => "₹"." ".$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 (₹)",'details' => "₹"." ".$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/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
index 764242ae..7ec30459 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
@@ -1371,6 +1371,23 @@ if ( isset($pdf) ) {
//
echo "
".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+| S.No | Particulars | Particular Details |
|---|---|---|
| '.($row_key + 1)." | ".$row['particulars']." | ".$row['details'] ." |
Financial statements not provided by ".$loan_word." Applicants to PD officer.
";} } + // if($pd_master_details[0]['lender_short_name'] != 'CFPL' ) {} ?> 0){ @@ -2463,7 +2498,27 @@ if($total_no_of_business > 0) { echo 'Working Capital Cycle:
+ + +| S.No | Particulars | Details |
|---|---|---|
| '.(++$fk) .' | '.$facility['name'].' | '.$facility['details'].' |
| S.No | Particulars | Days |
|---|
| S.No | Facility Type | Facility Details |
|---|---|---|
| '.(++$fk) .' | '.$facility['name'].' | '.$facility['details'].' |
";} + 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..c09caf9e 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
@@ -1368,6 +1368,23 @@ if ( isset($pdf) ) {
//
echo "
".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+| S.No | Particulars | Particular Details |
|---|---|---|
| '.($row_key + 1)." | ".$row['particulars']." | ".$row['details'] ." |
Working Capital Cycle:
+ + +| S.No | Particulars | Details |
|---|---|---|
| '.(++$fk) .' | '.$facility['name'].' | '.$facility['details'].' |
| S.No | Particulars | Days |
|---|
| S.No | Facility Type | Facility Details |
|---|
";} + 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..88ad07df 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
@@ -1372,6 +1372,23 @@ if ( isset($pdf) ) {
//
echo "
".$loan_form['loandetails_remarks'];
?>
+
+
Anchor Details Section:
+| S.No | Particulars | Particular Details |
|---|---|---|
| '.($row_key + 1)." | ".$row['particulars']." | ".$row['details'] ." |
Working Capital Cycle:
+ + +| S.No | Particulars | Details |
|---|---|---|
| '.(++$fk) .' | '.$facility['name'].' | '.$facility['details'].' |
| S.No | Particulars | Days |
|---|
| S.No | Facility Type | Facility Details |
|---|
";} + The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.
";} } ?>