From 2cd4e8dd40ddc0061991c94aecb21d3ddd3188e5 Mon Sep 17 00:00:00 2001 From: sanjeev Date: Fri, 17 Dec 2021 14:17:53 +0530 Subject: [PATCH] fixes : ps --- api/application/controllers/PD_Controller.php | 15 +++++++++------ .../views/report_templates/JSONTOREPORT_DI_AI.php | 2 +- .../views/report_templates/JSONTOREPORT_RI.php | 13 +++++++++++++ .../views/smc_creditpd_reports/MWISE.php | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 8e6ed516..d4570fe1 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -9350,18 +9350,21 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() if(!$records['is_multiple'] || isset($records['pd_document_id'])) { $where_condition_array = array('fk_pd_id' => $records['fk_pd_id'],'fk_form_id' => $records['fk_form_id'],'pd_document_title' => $current_doc_title); - if(isset($records['pd_document_id']) && isset($records['retake_flag']) && $records['retake_flag']) - { - $where_condition_array = array('pd_document_id' => $records['pd_document_id']); - unset($records['pd_document_id']); unset($records['retake_flag']) ; - $to_update = array('isactive' => 0,'retake_flag' => 0); - } + if(isset($records['pd_document_id']) && isset($records['retake_flag']) && $records['retake_flag']) + { + $where_condition_array = array('pd_document_id' => $records['pd_document_id']); + unset($records['pd_document_id']); unset($records['retake_flag']) ; + $to_update = array('isactive' => 0,'retake_flag' => 0); + } else if(isset($records['pd_document_id']) && $records['pd_document_id'] !=null && $records['pd_document_id'] != "" && $records['image'] == ""){ $where_condition_array = array('pd_document_id' => $records['pd_document_id']); $to_update = array("pd_image_alias_name"=>$records['pd_image_alias_name']); + }else{ + $to_update = array('isactive' => 0,'retake_flag' => 0); } $res = $this->PD_Model->updateRecords($to_update,PDDOCUMENTS,$where_condition_array); } + if($records['image'] != ""){ $res = $this->saveBase64Images($records['fk_pd_id'],($records['fk_form_id'] ? $records['fk_form_id'] : null),$company_id,$rental_count_id = null,array($img_array)); diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index fd00025a..de29bcc0 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -4101,7 +4101,7 @@ if($total_no_of_business > 0) { if(count($individualBankRow['banking_details'])>0){ // $tag['same_ac_used_for'] both $stmt_flag = array_map(function ($ar) { - return $ar['same_ac_used_for'] == "personal" ? 0 : ($stmt_flag+1); + return $ar['same_ac_used_for'] == "both" ? ($stmt_flag+1) : 0; }, $individualBankRow['banking_details']); $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); diff --git a/api/application/views/report_templates/JSONTOREPORT_RI.php b/api/application/views/report_templates/JSONTOREPORT_RI.php index 5882d180..c133e484 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI.php @@ -1292,14 +1292,25 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $ibRow) { $individualBankRow = json_decode($ibRow['processed_json'],true); $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if(isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1){ + $is_personal_banking_available = 1; + if(count($individualBankRow['business_details'])>0){ + $getBuinessEachValues=BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'],$pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult,$getBuinessEachValues); + } + } if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) { $is_personal_banking_available = 1; if(count($individualBankRow['banking_details'])>0){ + $stmt_flag = array_map(function ($ar) { + return $ar['same_ac_used_for'] == "both" ? ($stmt_flag+1) : 0; + }, $individualBankRow['banking_details']); $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); $bankingResult = array_merge($bankingResult,$getIndividualEachValues); @@ -1324,6 +1335,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); OD / CC Limit Vintage + Account Used for @@ -1337,6 +1349,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); + diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php index 8d24c870..4e0e377c 100644 --- a/api/application/views/smc_creditpd_reports/MWISE.php +++ b/api/application/views/smc_creditpd_reports/MWISE.php @@ -675,7 +675,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Activity Observed during Visit (Yes / No)