fixes : ps

This commit is contained in:
sanjeev 2021-12-17 14:17:53 +05:30
parent dbc2b7d21e
commit 2cd4e8dd40
4 changed files with 24 additions and 8 deletions

View File

@ -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));

View File

@ -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']);

View File

@ -1292,14 +1292,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php
$bankingResult=array();
$is_personal_banking_available = null;
$stmt_flag = 0;
// individual banking
foreach($pd_processed_forms[7] as $rowKey=> $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');
<th>OD / CC Limit</th>
<th>Vintage</th>
<th>Account Used for</th>
</tr>
</thead>
<tbody>
@ -1337,6 +1349,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class="customtd"><?php echo $bdRow['od_cc_limit'] ? $bdRow['od_cc_limit'] : "NA" ?></td>
<td class="customtd"><?php echo $bdRow['vintage'] ?></td>
<td class="customtd"><?php echo $bdRow['same_ac_used_for'] ?></td>
</tr>
<?php } ?>
</tbody>

View File

@ -675,7 +675,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<tbody>
<tr><th class="thlargefont">Activity Observed during Visit (Yes / No)</th></tr>
<?php
$business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_remark']) && $pd_section_data[8]['business_pd_visited_remark'] != '' ? ( '(' . $pd_section_data[8]['business_pd_visited_remark']. ' ) ' ) : 'Not Available');
$business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_remark']) && $pd_section_data[8]['business_pd_visited_remark'] != '' ? ( ' ( ' . $pd_section_data[8]['business_pd_visited_remark']. ' ) ' ) : 'Not Available');
?>
<tr><td class = "tdcenteralign"><?php echo (isset($pd_section_data[8]['business_is_pd_visited']) ? $pd_section_data[8]['business_is_pd_visited'].$business_pd_visited_remark : '')?> </td> </tr>