update improvement

This commit is contained in:
2024-01-16 11:13:36 +07:00
parent 439daf4e2e
commit cb6a98607a

View File

@@ -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'],