From 9a8792c731ebdaf06fc0a16f779d3c040447fd52 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Wed, 5 Feb 2020 15:05:25 +0530 Subject: [PATCH] CHFL REPORT CHANGES & NOTIFY & INDEX CHNAGES --- api/application/controllers/PD_Controller.php | 2 +- .../helpers/push_notification_helper.php | 4 +- .../report_templates/JSONTOREPORT_DI_AI.php | 70 ++++++++++++++++++- api/index.php | 8 +-- 4 files changed, 75 insertions(+), 9 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 509069af..605f2f8c 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2051,7 +2051,7 @@ public function assignPDTempalate($data) //Get All PD Logs $result_data['pd_logs'] = $this->PD_Model->getPDLogs($pdid); //print_r($result_data['pd_logs']);die(); - if(count($result_data['pd_logs'])) + if(count($result_data['pd_logs']) && isset($result_data['pd_logs']['last_status_update_date'])) { $result_data['pd_master_details'][0]['maser_updatedon'] = $result_data['pd_master_details'][0]['updatedon']; $result_data['pd_master_details'][0]['updatedon'] = DATE_FORMAT(date_create_from_format("Y-m-d H:i:s",$result_data['pd_logs']['last_status_update_date']),"d/m/Y h:i:s a"); diff --git a/api/application/helpers/push_notification_helper.php b/api/application/helpers/push_notification_helper.php index 39a7c15a..a7f3a8b8 100644 --- a/api/application/helpers/push_notification_helper.php +++ b/api/application/helpers/push_notification_helper.php @@ -27,7 +27,7 @@ class PUSH_NOTIFICATION $web_msg = array ( - 'title'=> $msg, + 'title'=> $additional_data['to_whom'] .' - '. $additional_data['pd_status'], 'body'=> $msg, 'icon' => 'https://pdgenie.com/logo/sinelogo.png', 'img' => 'https://pdgenie.com/logo/sinelogo.png' @@ -43,7 +43,7 @@ class PUSH_NOTIFICATION $app_msg = array ( 'message'=> $msg, - 'title'=> $msg, + 'title'=> $additional_data['pd_status'], 'subtitle'=> $msg, 'tickerText'=> $msg, 'vibrate'=>1, diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index a69ec918..d8c1c80e 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -2159,6 +2159,17 @@ if($total_no_of_business > 0) { $bindBusinessFinancial['customer_statements_header']=array(); $bindBusinessFinancial['is_customer_statement'] = 0; } + + + // ############### this section only for CLIX HOUSING FINANCE LENDER + if(strtoupper($businessFinancialRow['is_turnover_validated']) == 'YES') + { + $bindBusinessFinancial['turnover_statements']=FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['customer_statements_header']=FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['how_turnover_validated'] = (!strcasecmp( strtolower($businessFinancialRow['how_turnover_validated']),'others')) ? 'Validated from '.$businessFinancialRow['turnover_validated_others'] : $businessFinancialRow['how_turnover_validated']; + $bindBusinessFinancial['is_turnover_validated'] = 1; + } + // ############### this section only for CLIX HOUSING FINANCE LENDER $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'] = is_numeric($businessFinancialRow['unsold_stock_lies_in_days']) ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; @@ -2344,14 +2355,69 @@ if($total_no_of_business > 0) { As per Loan Applicant(s) met,'. $rupee_symbol . ' '. MYUTIL:: customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) .' as Annual sales through credit cards / POS machines.

'; + echo '

As per Loan Applicant(s) met,'. $rupee_symbol . ' '. MYUTIL::customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) .' as Annual sales through credit cards / POS machines.

'; }; } ?> As per Loan Applicant(s) met, the financials figures were not provided.

"; } - ?> + + // ####################### THIS SECTION ONLY FOR CLIX HOUSING FINANCE LENDER ##########################--> + + foreach($iterateFinance['turnover_statements'] as $turnover){ + if(!strcasecmp($turnover['estimate_net_margin_availablity'],'yes')){ + ?> +

Turnover Validated During PD:

+ + + + + + + + + + + + + + + + + +
Particulars Range provided Final Considered
From To
Sales / Revenue (Rs)
Net Profit or (Net Loss) to Sales % >
Net Profit / (Net Loss) (Rs) >>>> >
+ + +

Turnover Validated During PD:

+ + + + + + + + + + + + + + + + + + + + + +
Particulars Range provided Final Considered
From To
Sales / Revenue (Rs)
Net Profit or (Net Loss) to Sales (Rs) >
Net Profit / (Net Loss)% >>>> >
+ Turnover and Netprofit was '.$iterateFinance['how_turnover_validated'] + + ?> + +