From 6f72fd359a8d36db001b705bb15e1c9bdc4991e5 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 17:33:22 +0530 Subject: [PATCH 1/5] CHANGE_bds_issue-final-fix-6 - VADIVEL J 2025-10-31 16:55 --- app/Views/report_bds.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 18ad229b..b380a140 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -166,8 +166,8 @@ if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "no statement uploaded" ){ continue ; } - else if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "statement uploaded" && $pastMonth != $currentMonth){ - unset($uniquePoliciesReport[$uniqueRecord]); + else if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "statement uploaded" ){ + continue; }else{ if(isset($uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]) ){ From 036adda88a1a00662182216cb87290b1ac0c859a Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 18:24:31 +0530 Subject: [PATCH 2/5] CHANGE_bds_issue-final-fix-6 - VADIVEL J 2025-10-31 16:24 --- app/Views/report_bds.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index b380a140..2d6eba73 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -153,20 +153,28 @@ - $uniqueRecord = "$policy_no-$policy_updated_month-$policy_type-$client_name-$insurer_branch_name" ; + $uniqueRecord = "$policy_no-$policy_updated_month-$policy_type-$client_name-$insurer_branch_name-$statement_status" ; // irrespective of months or multiple months $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" ){ + $pastStatementStatus = explode("-",$uniqueRecord )[5] ; + $currentStatementStatus = $statement_status; + + if( + isset($uniquePoliciesReport[$uniqueRecord]) + && $pastStatementStatus == $currentStatementStatus + ){ continue ; } - else if(isset($uniquePoliciesReport[$uniqueRecord]) && $statement_status == "statement uploaded" ){ + else if( + isset($uniquePoliciesReport[$uniqueRecord]) + && $pastStatementStatus == $currentStatementStatus + ){ continue; }else{ From 21aa53cf2a18cdbb1db9e7bdfd717a484e532951 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 18:28:36 +0530 Subject: [PATCH 3/5] CHANGE_bds_issue-final-fix-6 - VADIVEL J 2025-10-31 16:27 --- app/Views/report_bds.php | 1126 +++++++++++++++------------------- app/Views/report_bds_new.php | 660 ++++++++++++++++++++ 2 files changed, 1170 insertions(+), 616 deletions(-) create mode 100644 app/Views/report_bds_new.php diff --git a/app/Views/report_bds.php b/app/Views/report_bds.php index 2d6eba73..5a1786f4 100644 --- a/app/Views/report_bds.php +++ b/app/Views/report_bds.php @@ -1,660 +1,554 @@ - - -
- -
-
-
-
-

BDS Report

-
+ +
+
+
+
+
+

BDS Report

+ +
+
+
+ +
+ Total Premium: 0.00 +
+ +
+ Total Rewards: 0.00 +
+ +
+ Total IRDA Revenue INR: 0.00 +
+ +
+ Total Billed Amount: 0.00 +
+ +
+ Total Unbilled Amount: 0.00 +
+ +
+ Total Policy Count: +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $row){ ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S. NoUserMonthClient TypeInsured NamePolicy/
Endorsement
Policy TypeBAP GroupVehicle NumberPolicy NoEndorsement NoInsurer BranchEndorsement
Effective Date
Policy
Effective Date
Policy
Expiry Date
ReferenceRemarksBP PremiumTP/Ter PremiumPremium
(without GST)
Total PremiumBP %TP/Ter %RewardsAgreed AmountInvoiced AmountOutstanding Amount
  " class="mdi mdi-pencil" >  % %
+ +
+
+
+
+
+
+ + + -
-
-
-
-
-
+ - - + \ No newline at end of file + \ No newline at end of file diff --git a/app/Views/report_bds_new.php b/app/Views/report_bds_new.php new file mode 100644 index 00000000..2d6eba73 --- /dev/null +++ b/app/Views/report_bds_new.php @@ -0,0 +1,660 @@ + + +
+ +
+
+
+
+

BDS Report

+
+ +
+
+
+ +
+ Total Premium: 0.00 +
+ +
+ Total Rewards: 0.00 +
+ +
+ Total IRDA Revenue INR: 0.00 +
+ +
+ Total Billed Amount: 0.00 +
+ +
+ Total Unbilled Amount: 0.00 +
+ +
+ Total Policy Count: +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $row){ + + $policy_no = $row['policy_no']; + + $policy_updated_month = $row['policy_issue_month']; + + $policy_type = $row['policy_type']; + + $statement_status = $row['statement_uploaded']; + + $client_name = $row['client_name']; + + $insurer_branch_name = $row['insurer_branch_name']; + + + + $uniqueRecord = "$policy_no-$policy_updated_month-$policy_type-$client_name-$insurer_branch_name-$statement_status" ; + + // irrespective of months or multiple months + $uniqueAgreedAmountPerInsurer = "$policy_no-$policy_type-$client_name-$insurer_branch_name" ; + + + $pastMonth = explode("-",$uniqueRecord )[1] ; + $currentMonth = $policy_updated_month ; + + $pastStatementStatus = explode("-",$uniqueRecord )[5] ; + $currentStatementStatus = $statement_status; + + if( + isset($uniquePoliciesReport[$uniqueRecord]) + && $pastStatementStatus == $currentStatementStatus + ){ + continue ; + } + else if( + isset($uniquePoliciesReport[$uniqueRecord]) + && $pastStatementStatus == $currentStatementStatus + ){ + continue; + }else{ + + if(isset($uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]) ){ + + + $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer] -= $row['billed_amt']; + $row['total_irda_amt'] = $pastMonth == $currentMonth ? $row['total_irda_amt'] : 0 ; + $row['outstanding_amt'] = $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]; + $row['multiple_months'] = $pastMonth == $currentMonth ? false : true ; + } + else{ + $row['outstanding_amt'] = $row['total_irda_amt'] - $row['billed_amt']; + $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer] = $row['total_irda_amt'] ; + $row['multiple_months'] = false; + } + + + + $uniquePoliciesReport[$uniqueRecord] = $row; + } + + + + + + + } + + + + + + + $report_list = array_values($uniquePoliciesReport); + + ?> + + + + $row){ + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S. NoUserMonthstatement uploadClient TypeInsured NamePolicy/
Endorsement
Policy TypeBAP GroupVehicle NumberPolicy NoEndorsement NoInsurer BranchEndorsement
Effective Date
Policy
Effective Date
Policy
Expiry Date
ReferenceRemarksBP PremiumTP/Ter PremiumPremium
(without GST)
Total PremiumBP %TP/Ter %RewardsAgreed AmountInvoiced AmountOutstanding Amount
  " class="mdi mdi-pencil" >  % %
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file From 0979086fadf272264d019168309f5f685489ba88 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 18:31:59 +0530 Subject: [PATCH 4/5] CHANGE_bds_issue-final-fix-6 - VADIVEL J 2025-10-31 16:31 --- app/Views/report_bds_new.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/Views/report_bds_new.php b/app/Views/report_bds_new.php index 2d6eba73..4f02d0e6 100644 --- a/app/Views/report_bds_new.php +++ b/app/Views/report_bds_new.php @@ -170,12 +170,6 @@ && $pastStatementStatus == $currentStatementStatus ){ continue ; - } - else if( - isset($uniquePoliciesReport[$uniqueRecord]) - && $pastStatementStatus == $currentStatementStatus - ){ - continue; }else{ if(isset($uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]) ){ From aeffee87740da16acb5594cd557108d7d6cfee67 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 31 Oct 2025 18:35:18 +0530 Subject: [PATCH 5/5] CHANGE_bds_issue-final-fix-6 - VADIVEL J 2025-10-31 16:35 --- app/Config/Routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 133d3767..54b05f32 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -427,8 +427,8 @@ $routes->group("policy_tranction", ["filter" => "authMVC"], function ($routes) { }); $routes->group("report", ["filter" => "authMVC"], function ($routes) { - $routes->match(['get', 'post'],"list", "PolicyTransactionController::reportBDSNew"); - $routes->match(['get', 'post'],"list_old", "PolicyTransactionController::reportBDS"); + $routes->match(['get', 'post'],"list", "PolicyTransactionController::reportBDS"); + $routes->match(['get', 'post'],"list_new", "PolicyTransactionController::reportBDSNew"); $routes->get("report-varience-list", "PolicyTransactionController::reportVarience"); $routes->get("report-business-list", "PolicyTransactionController::reportBusinessList"); $routes->get("report-finance-list", "PolicyTransactionController::reportFinanceList");