diff --git a/app/Controllers/ApiServiceController.php b/app/Controllers/ApiServiceController.php index de934916..0a716086 100644 --- a/app/Controllers/ApiServiceController.php +++ b/app/Controllers/ApiServiceController.php @@ -898,6 +898,7 @@ class ApiServiceController extends BaseController ->where('client_policy.tpa_id', $tpa_id) ->where('batch_files.is_active', 1) ->where('batch_files.event_type', 'api') + ->where('batch_files.client_policy_id', $policy_id) ->where('batch_files.icici_status_flag !=', 'COMPLETED') ->countAllResults(); diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 44d47589..351d674f 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -4072,8 +4072,8 @@ class PolicyTransactionController extends BaseController $user_id = $this->request->getGet('user_id') ?? $this->request->getPost('user_id'); if ($date_type == 'statement_month' && $start_date && $end_date) { - $start_date = (string) date('Y-m-01', strtotime($start_date)); - $end_date = (string) date('Y-m-t', strtotime($end_date)); + $start_date = (string) date('Y-m-01', strtotime($start_date)); + $end_date = (string) date('Y-m-t', strtotime($end_date)); } $normalize = static function ($value) { @@ -4090,7 +4090,7 @@ class PolicyTransactionController extends BaseController $ids = array_filter(explode(',', $sanitized_post_data['ids'] ?? '')); if (!empty($ids)) { - $idsStr = implode(',', array_map('intval', $ids)); + $idsStr = implode(',', array_map('intval', $ids)); $where = "policy_transaction.id IN ($idsStr)"; } else { $where = [];