From cbd33ecb282324fc1c06418946b0719e724501d2 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 20 Mar 2021 18:41:43 +0530 Subject: [PATCH 1/3] saveOrUpdateUserConfig API implemented : Fairoj --- api/application/config/routes.php | 1 + .../User_Management_Controller.php | 109 ++++++++++++++++++ .../models/User_Management_Model.php | 28 ++++- 3 files changed, 137 insertions(+), 1 deletion(-) diff --git a/api/application/config/routes.php b/api/application/config/routes.php index de062273..752d890e 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -105,6 +105,7 @@ $route['updateExistUser'] = 'User_Management_Controller/updateExistUser'; $route['getUsersDetails'] = 'User_Management_Controller/getUsersDetails'; $route['getSingedProfilePicURL'] = 'User_Management_Controller/getSingedProfilePicURL'; $route['checkpin'] = 'User_Management_Controller/checkpin'; +$route['saveOrUpdateUserConfig'] = 'User_Management_Controller/saveOrUpdateUserConfig'; // TEMPLATE MANAGEMENT $route['(listAllTemplates/:any)'] = 'Template_Management_Controller/listAllTemplates/'; diff --git a/api/application/controllers/User_Management_Controller.php b/api/application/controllers/User_Management_Controller.php index 2a97d523..aaf2b3d7 100644 --- a/api/application/controllers/User_Management_Controller.php +++ b/api/application/controllers/User_Management_Controller.php @@ -429,4 +429,113 @@ class User_Management_Controller extends REST_Controller { } } + + /** USER CONFIGURATION SAVE AND UPDATE API + * @PARAM post params sales_products, state mapping -- currently implemented for MWISE LENDER only + */ + public function saveOrUpdateUserConfig_post() { + if($this->post('user_id')) { + $user_id = $this->post('user_id'); + $user_config = $this->User_Management_Model->getUserConfigDetails($user_id); + // print_r($user_config); + // die(); + $salesproduct_msg = ""; + $rcmstate_msg = ""; + /** FOR SALES PD PRODUCTS ADD AND UPDATE */ + + if($this->post('salespd_products')){ + $salespd_products = $this->post('salespd_products'); + if($salespd_products && !empty($salespd_products)) + { + $salespd_products = (implode(',',$salespd_products)); + $arr = array('fk_user_id' => $user_id,'config_type' => 1,'data' => $salespd_products); + $this->db->set($arr); + if(!$user_config || !array_key_exists('salespd_products',$user_config) || empty($user_config['salespd_products'])) { + $res = $this->db->insert(USERCONFIG); + $salesproduct_msg = "Sales Products Added"; + } + else{ + $this->db->where('fk_user_id',$user_id); + $res = $this->db->update(USERCONFIG); + $salesproduct_msg = "Sales Products Updated"; + } + // print_r($res); + + } + } + /** END OF SALES PD PRODUCTS ADD AND UPDATE */ + + /** FOR INSERTING THE RCM STATE MAPPING DATA */ + if($this->post('rcm_state_mapping')){ + $rcm_state_mapping = $this->post('rcm_state_mapping'); + } + if($rcm_state_mapping && !empty($rcm_state_mapping)) { + if(!$user_config || !array_key_exists('rcm_state_mapping',$user_config) || empty($user_config['rcm_state_mapping'])) { + + } + else { + $intersect_value = array_intersect($rcm_state_mapping,$user_config['rcm_state_mapping']); + if(!empty($intersect_value)) { + + foreach( $intersect_value as $key => $value) { + + $key = (float) array_search($value,$rcm_state_mapping); + unset($rcm_state_mapping[$key]); + + $key = (float) array_search($value,$user_config['rcm_state_mapping']); + unset($user_config['rcm_state_mapping'][$key]); + } + if(!empty($user_config['rcm_state_mapping'])) { + $this->User_Management_Model->deactivateDataOnRcmStateMapping($user_id,$user_config['rcm_state_mapping']); + $rcmstate_msg = "RCM States Modified"; + } + } + // print_r($rcm_state_mapping); + // die(); + if(!empty($rcm_state_mapping)) { + $insert_value = array(); + foreach($rcm_state_mapping as $key=>$value) { + if($value) { + array_push($insert_value,(object)[ + "fk_user_id" => $user_id, + "fk_state_id" => $value, + "isactive" => "1" + ]); + } + } + if(!empty($insert_value)) { + $res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value); + $rcmstate_msg = "RCM States Added"; + } + } + // echo "\n old data \n"; + // print_r($user_config['rcm_state_mapping']); + // echo "new data"; + // print_r($rcm_state_mapping); + // die(); + } + } + + /** END OF INSERTING THE RCM STATE MAPPING DATA */ + + $response_msg = salesproduct_msg ? $salesproduct_msg : ''; + $response_msg.= $response_msg && $rcmstate_msg ? ' and '.$rcmstate_msg : $rcmstate_msg ? ' '.$rcmstate_msg : ''; + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['msg'] = $response_msg." Successully"; + $this->response($data,REST_Controller::HTTP_OK); + + /** FOR GETTING SALES PRODUCTS */ + // $user_id = $this->post('user_id'); + // $user_config = $this->User_Management_Model->getUserConfigDetails($user_id); + // print_r($user_config); + +} +else { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_FOUND; + $data['msg'] = 'User Not Found'; + $this->response($data,REST_Controller::HTTP_NOT_FOUND); +} + } } \ No newline at end of file diff --git a/api/application/models/User_Management_Model.php b/api/application/models/User_Management_Model.php index b616b1f5..73e45e77 100644 --- a/api/application/models/User_Management_Model.php +++ b/api/application/models/User_Management_Model.php @@ -123,7 +123,23 @@ class User_Management_Model extends SPARQ_Model { } } - + + /** FOR GETTING THE RCM STATE MAPPING DATA BY ACTIVE USER ID */ + $this->db->select('*'); + $this->db->where('RCM_STATE_MAPPING.fk_user_id',$userid); + $this->db->where('RCM_STATE_MAPPING.isactive',1); + $state_mapping_result = $this->db->get(RCM_STATE_MAPPING.' as RCM_STATE_MAPPING')->result_array(); + // print_r($state_mapping_result); + // die(); + if(count($state_mapping_result) != 0) { + $return_data['rcm_state_mapping'] = array(); + foreach($state_mapping_result as $key => $value) + { + array_push($return_data['rcm_state_mapping'],$value['fk_state_id']); + } + } + /** END OF GETTING THE RCM STATE MAPPING DATA BY ACTIVE USER ID */ + return $return_data; @@ -147,4 +163,14 @@ class User_Management_Model extends SPARQ_Model { return $result_data; } } + + public function deactivateDataOnRcmStateMapping($userid,$data_arr) { + echo "inside function"; + foreach($data_arr as $key => $value) { + $this->db->set(array('isactive' => 0)); + $this->db->where('fk_user_id',$userid); + $this->db->where('fk_state_id',$value); + $this->db->update(RCM_STATE_MAPPING); + } + } } \ No newline at end of file From 700b2ad1c75accc0402e6912d6232b517ae5230c Mon Sep 17 00:00:00 2001 From: Sanjeev Date: Sat, 20 Mar 2021 18:55:58 +0530 Subject: [PATCH 2/3] cfpl lender's report changes : ps --- api/application/config/autoload.php | 2 +- api/application/controllers/PD_Controller.php | 13 ++- api/application/helpers/loanform_helper.php | 85 +++++++++++++++++++ .../report_templates/JSONTOREPORT_DI_AI.php | 69 +++++++++++++-- .../JSONTOREPORT_DI_AI_SMARTPD.php | 63 +++++++++++++- .../JSONTOREPORT_DI_AI_TELE_PD.php | 63 +++++++++++++- 6 files changed, 277 insertions(+), 18 deletions(-) create mode 100644 api/application/helpers/loanform_helper.php 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:

+ + + + $row) + { + echo '"; + } + ?> + +
S.No Particulars Particular Details
'.($row_key + 1)." ".$row['particulars']." ".$row['details'] ."
+ @@ -2217,6 +2234,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 +2254,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); ?> @@ -2300,13 +2335,13 @@ if($total_no_of_business > 0) { } 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 +2498,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:

+ + + + + + $facility){ + echo ''; + }?> + +
S.No Particulars Details
'.(++$fk) .''.$facility['name'].' '.$facility['details'].'
+ + +

@@ -2475,18 +2530,18 @@ if($total_no_of_business > 0) { -

Working Capital Facilities:

+

S.No Particulars Days
$facility){ - + echo ''; }?>
S.No Facility Type Facility Details
'.(++$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..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:

+ + + + $row) + { + echo '"; + } + ?> + +
S.No Particulars Particular Details
'.($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:

+ + + + + + $facility){ + echo ''; + }?> + +
S.No Particulars Details
'.(++$fk) .''.$facility['name'].' '.$facility['details'].'
+ + +

@@ -2472,7 +2527,7 @@ if($total_no_of_business > 0) { -

Working Capital Facilities:

+

S.No Particulars Days
@@ -2483,7 +2538,7 @@ if($total_no_of_business > 0) { }?>
S.No Facility Type 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_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:

+ + + + $row) + { + echo '"; + } + ?> + +
S.No Particulars Particular Details
'.($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:

+ + + + + + $facility){ + echo ''; + }?> + +
S.No Particulars Details
'.(++$fk) .''.$facility['name'].' '.$facility['details'].'
+ + +

@@ -2474,7 +2529,7 @@ if($total_no_of_business > 0) { -

Working Capital Facilities:

+

S.No Particulars Days
@@ -2485,7 +2540,7 @@ if($total_no_of_business > 0) { }?>
S.No Facility Type 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.

";} } ?> From 9cc8c32653df933beba46952afba1e12b8e71e5a Mon Sep 17 00:00:00 2001 From: Sanjeev Date: Sat, 20 Mar 2021 19:08:43 +0530 Subject: [PATCH 3/3] changes on report for CFPL : ps --- api/application/views/report_templates/JSONTOREPORT_DI_AI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index 7ec30459..42b72c7c 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -2329,7 +2329,7 @@ if($total_no_of_business > 0) {

' . $comments_on_financials . '

'; - + }