From 67fc01039a2245f8857ae867866a70d2d27f1f1b Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 16:55:35 +0530 Subject: [PATCH] CHANGE_bds_issue-final-fix-5 - VADIVEL J 2025-10-31 16:55 --- app/Views/report_bds.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index e856f82e..18ad229b 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -159,18 +159,19 @@ $uniqueAgreedAmountPerInsurer = "$policy_no-$policy_type-$client_name-$insurer_branch_name" ; + $pastMonth = explode("-",$uniqueRecord )[1] ; + + $currentMonth = $policy_updated_month ; if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "no statement uploaded" ){ continue ; } - else if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "statement uploaded" ){ + else if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "statement uploaded" && $pastMonth != $currentMonth){ unset($uniquePoliciesReport[$uniqueRecord]); }else{ if(isset($uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]) ){ - - $pastMonth = explode("-",$uniqueRecord )[1] ; - $currentMonth = $policy_updated_month ; + $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer] -= $row['billed_amt']; $row['total_irda_amt'] = $pastMonth == $currentMonth ? $row['total_irda_amt'] : 0 ;