From c44ac950680b6bf6e9d24f84fc7a345b41614f0a Mon Sep 17 00:00:00 2001
From: "sanjeev.p"
Date: Sat, 11 Sep 2021 15:55:10 +0530
Subject: [PATCH] changes (informed by venkat): ps
---
api/application/helpers/loanform_helper.php | 28 +++++++++----------
.../report_templates/JSONTOREPORT_DI_AI.php | 4 ++-
.../JSONTOREPORT_DI_AI_SMARTPD.php | 4 ++-
.../JSONTOREPORT_DI_AI_TELE_PD.php | 4 ++-
4 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/api/application/helpers/loanform_helper.php b/api/application/helpers/loanform_helper.php
index e70597cf..7cfb00d0 100644
--- a/api/application/helpers/loanform_helper.php
+++ b/api/application/helpers/loanform_helper.php
@@ -16,25 +16,25 @@ public static function getanchordetails($loan_form){
$payment_mechanism_arr = array('bill_wise' => 'Bill Wise','open_account' => 'Open Account');
$sales_low_months=SELF::getMonths($loan_form['sales_low_months']);
+
+ if((int)$loan_form['vintage_anchor_year'] > 1 ){ $yr = $loan_form['vintage_anchor_year']." Years";}
+ else if((int)$loan_form['vintage_anchor_year'] == 1 ){ $yr = $loan_form['vintage_anchor_year']." Year"; }
+ else{ $yr = ''; }
- // 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((int)$loan_form['vintage_anchor_month'] > 1 ){ $mnt = $loan_form['vintage_anchor_month']." Months";}
+ else if((int)$loan_form['vintage_anchor_month'] == 1 ){ $mnt = $loan_form['vintage_anchor_month']." Month"; }
+ else{ $mnt = ''; }
- // 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 = '-';}
+ 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' => "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']);
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
index 2baf82d1..bff48700 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
@@ -556,7 +556,9 @@ if ( isset($pdf) ) {
Loan Amount Applied For :
";
//echo '
- echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
+ $pd_initiation_loan_amt = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? $loan_form['loan_amount'] : $loan_form['facility_amount'];
+ echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_initiation_loan_amt). ' ('. MYUTIL::numtowords($pd_initiation_loan_amt) .') |
';
+ // echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
echo '
';
//echo "";
echo "
";
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 2b2ae9a4..f6ad8ab2 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php
@@ -563,7 +563,9 @@ if ( isset($pdf) ) {
Loan Amount Applied For : ";
//echo '
- echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
+ $pd_initiation_loan_amt = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? $loan_form['loan_amount'] : $loan_form['facility_amount'];
+ echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_initiation_loan_amt). ' ('. MYUTIL::numtowords($pd_initiation_loan_amt) .') |
';
+ // echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
echo '
';
//echo "";
echo "
";
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 febe778f..ea594dc3 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
@@ -558,7 +558,9 @@ if ( isset($pdf) ) {
Loan Amount Applied For : ";
//echo '
- echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
+ $pd_initiation_loan_amt = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? $loan_form['loan_amount'] : $loan_form['facility_amount'];
+ echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_initiation_loan_amt). ' ('. MYUTIL::numtowords($pd_initiation_loan_amt) .') |
';
+ // echo ' '.$loan_word.' Amount (As Per PD Initiation) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). ' ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .') |
'.$loan_word.' Amount (As Per '.$loan_word.' Applicants during PD) | : | ₹' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). ' ('. MYUTIL::numtowords($loan_form['loan_amount']) .') |
';
echo '
';
//echo "";
echo "
";