From 8908400d504321d5b2d9d1efcc194de6dbfc676f Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Tue, 7 Nov 2023 13:18:58 +0700 Subject: [PATCH] bugs fix import claim --- app/Services/ClaimRequestService.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/app/Services/ClaimRequestService.php b/app/Services/ClaimRequestService.php index 3141f436..b03cabc9 100644 --- a/app/Services/ClaimRequestService.php +++ b/app/Services/ClaimRequestService.php @@ -76,13 +76,13 @@ class ClaimRequestService{ 'member_id' => $member->id, 'currency' => 'IDR', 'plan_id' => $member->currentPlan->id, - 'total_claim' => $row['tot_amt_insurred'], - 'benefit_code' => $row['benefit_code'], - 'benefit_desc' => $row['benefit_desc'], - 'amount_incurred' => $row['tot_amt_insurred'], - 'amount_approved' => $row['tot_amt_approved'], - 'amount_not_approved' => $row['tot_amt_not_approved'], - 'excess_paid' => $row['tot_excess_paid'], + 'total_claim' => $row['tot_amt_insurred'] ? $row['tot_amt_insurred'] : 0, + 'benefit_code' => $row['benefit_code'] ? $row['benefit_code'] : '-', + 'benefit_desc' => $row['benefit_desc'] ? $row['benefit_desc'] : '-', + 'amount_incurred' => $row['tot_amt_insurred'] ? $row['tot_amt_insurred'] : 0, + 'amount_approved' => $row['tot_amt_approved'] ? $row['tot_amt_approved'] : 0, + 'amount_not_approved' => $row['tot_amt_not_approved'] ? $row['tot_amt_not_approved'] :0, + 'excess_paid' => $row['tot_excess_paid'] ? $row['tot_excess_paid'] : 0, 'claim_request_id' => $claim_request_id, 'organization_id' => $organization ? $organization->id : NULL, 'status' => 'requested' @@ -168,15 +168,8 @@ class ClaimRequestService{ ]); $claim_request_data = $row; - - dd($row); - // dd($claim_request_data['admission_date']); - $this->validatePlanRow($claim_request_data); - - - return $newClaimRequest; } catch (\Exception $e) { throw $e;