FIX_LIVE_ISSUES_STATEMENT_UPLOAD_AND_VIDAL_DOA

This commit is contained in:
VENKATESHWARAN 2026-04-30 11:15:23 +05:30
parent 230e953f7c
commit 17b8d2702b
3 changed files with 14 additions and 6 deletions

View File

@ -4168,7 +4168,7 @@ class PolicyTransactionController extends BaseController
//get no of line items and update in DB
$line_items = 0;
// get uploaded month transactions data
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']);
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id'], month: $file['month']);
// var_dump($source_data);die();
// Kint::dump($source_data);die();
@ -4291,7 +4291,7 @@ class PolicyTransactionController extends BaseController
$line_items = 0;
// get uploaded month transactions data
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']);
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id'], month: $file['month']);
// dd($source_data);
// check policy no,insurer and etc in DB for this month
@ -4439,7 +4439,7 @@ class PolicyTransactionController extends BaseController
//get no of line items and update in DB
$line_items = count($excel_data);
// get uploaded month transactions data
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id']);
$source_data = $this->PTCOShareDetailsModel->getNonReconcileredPolicyTransactions(insurer_id: $file['insurer_id'], insurer_branch_id: $file['branch_id'], month: $file['month']);
// Kint::dump($source_data);//die;
// Kint::dump($excel_data);
// die;

View File

@ -476,6 +476,7 @@ class VidalApiController extends BaseController
$ticket = $this->db->table('ticket_master tm')
->select("
tm.id,
tm.doa,
tm.tpa_no as memberId,
tm.tpa_claim_push_reference_no as claimRefNo,
tm.tpa_claim_id as claimID,
@ -592,6 +593,7 @@ class VidalApiController extends BaseController
$TicketData = $this->db->table('ticket_master tm')
->select("
tm.id,
tm.doa,
tm.tpa_no as memberId,
tm.tpa_claim_push_reference_no as claimRefNo,
tm.tpa_claim_id as claimNo,
@ -1650,6 +1652,7 @@ class VidalApiController extends BaseController
$ticket = $this->db->table('ticket_master tm')
->select("
tm.id,
tm.doa,
tm.tpa_no as memberId,
tm.tpa_claim_push_reference_no as claimInwardNO,
tm.tpa_claim_id as claimNO,

View File

@ -72,11 +72,14 @@ class PTCOShareDetailsModel extends Model
'file_id',
];
public function getNonReconcileredPolicyTransactions(string $insurer_id,string $insurer_branch_id)
public function getNonReconcileredPolicyTransactions(string $insurer_id,string $insurer_branch_id, string $month)
{
$currentDate = date('Y-m-d');
$sixMonthsAgo = date('Y-m-01', strtotime('-6 months'));
$startDate = $month;
$endDate = date('Y-m-t', strtotime($startDate));
return $this->db->table('pt_co_share_details pt_co')
->select('
pt_co.id,
@ -109,8 +112,10 @@ class PTCOShareDetailsModel extends Model
->where('pt_co.insurer_branch_id', $insurer_branch_id)
// ->where('pt_co.statement_id is null')
->where('pt.status','completed')
->where('DATE(pt.created_at) >=', $sixMonthsAgo)
->where('DATE(pt.created_at) <=', $currentDate)
// ->where('DATE(pt.created_at) >=', $sixMonthsAgo)
// ->where('DATE(pt.created_at) <=', $currentDate)
->where('pt_co.pt_policy_issue_date >=', $startDate)
->where('pt_co.pt_policy_issue_date <=', $endDate)
// ->where('pt_co.exp_amt', 0.00)
// ->orWhere('pt_co.exp_amt is null')
->get()