From cb6a98607a83888aa049aad9154e53db265d437c Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Tue, 16 Jan 2024 11:13:36 +0700 Subject: [PATCH] update improvement --- Modules/Internal/Services/RequestLogService.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/Internal/Services/RequestLogService.php b/Modules/Internal/Services/RequestLogService.php index fd1272d6..eb1b89db 100644 --- a/Modules/Internal/Services/RequestLogService.php +++ b/Modules/Internal/Services/RequestLogService.php @@ -34,6 +34,7 @@ class RequestLogService "Total Billing" => "total_billing", "Amount Approval" => "amount_approval", "Amount Not Approval" => "amount_not_approval", + "Final Billing" => "final_billing", "QC 1" => "status_final_log", "Ingestion Code" => "ingestion_code", // TODO I think this should not be here because if user uploading result then ingestion code and status will be filled "Ingestion Status" => "ingestion_status", @@ -54,6 +55,7 @@ class RequestLogService "total_billing" => "Total Billing", "amount_approval" => "Amount Approval", "amount_not_approval" => "Amount Not Approval", + "final_billing" => "Final Billing", "status_final_log" => "QC 1" , "ingestion_code" => "Ingestion Code", "ingestion_status" => "Ingestion Status", @@ -73,6 +75,7 @@ class RequestLogService "Total Billing", "Amount Approval", "Amount Not Approval", + "Final Billing", "QC 1", "Ingestion Code", "Ingestion Status", @@ -92,6 +95,7 @@ class RequestLogService "Total Billing", "Amount Approval", "Amount Not Approval", + "Final Billing", "QC 1", "Ingestion Code", "Ingestion Status", @@ -235,7 +239,7 @@ class RequestLogService if ($benefit) { // jika tidak ada benefit nya maka belum ngisi benefit nya // Delete item - if ($row['total_billing']){ + if ($row['final_billing']){ RequestLogBenefit::where('request_log_id', '=', $requestLog->id)->delete(); } @@ -244,7 +248,7 @@ class RequestLogService [ 'request_log_id' => $requestLog->id, 'benefit_id' => $benefit->id, - 'amount_incurred' => ($row['amount_not_approval'] ? $row['amount_not_approval'] : 0) + $row['amount_approval'] , + 'amount_incurred' => $row['total_billing'], 'amount_approved' => $row['amount_approval'], 'amount_not_approved' => $row['amount_not_approval'] ?? 0, 'excess_paid' => $row['amount_not_approval'],