diff --git a/app/Models/PolicyTransactionModel.php b/app/Models/PolicyTransactionModel.php index 4882bd8a..c62fa4cc 100644 --- a/app/Models/PolicyTransactionModel.php +++ b/app/Models/PolicyTransactionModel.php @@ -2191,6 +2191,8 @@ ->where('policy_transaction.is_active', 1) ->where('pt_co_share_details.is_active', 1) + ->where('co_share_stmt_details.is_active', 1) + ->where('insurer_statements_oq.is_active', 1) ->where('insurer_statements_oq.id IS NOT NULL') diff --git a/app/Views/report_bds_filter.php b/app/Views/report_bds_filter.php index fd8be988..6ee3280b 100644 --- a/app/Views/report_bds_filter.php +++ b/app/Views/report_bds_filter.php @@ -147,7 +147,12 @@
- + +
diff --git a/app/Views/report_bds_new.php b/app/Views/report_bds_new.php index 4f02d0e6..474f92f1 100644 --- a/app/Views/report_bds_new.php +++ b/app/Views/report_bds_new.php @@ -159,26 +159,14 @@ $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($uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]) ){ $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer] -= $row['billed_amt']; - $row['total_irda_amt'] = $pastMonth == $currentMonth ? $row['total_irda_amt'] : 0 ; + $row['total_irda_amt'] = 0 ; $row['outstanding_amt'] = $uniqueAgreedAmountList[$uniqueAgreedAmountPerInsurer]; - $row['multiple_months'] = $pastMonth == $currentMonth ? false : true ; + $row['multiple_months'] = true ; } else{ $row['outstanding_amt'] = $row['total_irda_amt'] - $row['billed_amt']; @@ -189,7 +177,7 @@ $uniquePoliciesReport[$uniqueRecord] = $row; - } +