bugs fixi di production

This commit is contained in:
Linksehat Staging Server
2024-03-05 13:20:35 +07:00
parent c1b1270972
commit 3fbc4c2cd1
6 changed files with 71 additions and 68 deletions

View File

@@ -184,7 +184,7 @@ class RequestLogService
// $kodeOrganisasi = "ORG000" . $singkatan;
// Insert data ke tabel organizations
$organization = DB::table('organizations')->where('code', $row['organization_id'])->first();
if (!$organization){
throw new ImportRowException(__('Provider Not Found'), 0, null, $row);
}
@@ -219,7 +219,7 @@ class RequestLogService
} else {
$status = 'requested';
}
$service = Service::where('name', $row['service'])->first();
if ($service){
$serviceCode = $service->code;
@@ -237,7 +237,7 @@ class RequestLogService
$final_log = 1;
}
if ($row['diagnosis']){
if ($row['total_billing']){ // header
$data = [
'code' => $code,
'member_id' => $member->id,
@@ -258,26 +258,26 @@ class RequestLogService
'service_code' => $serviceCode,
'approved_final_log_at' => $row['approved_final_log_at'],
];
} else {
} else { // item
$data = [
'code' => $code,
'member_id' => $member->id,
'submission_date' => $row['submission_date'],
'discharge_date' => $row['discharge_date'],
'payment_type' => 'cashless',
'status' => $status,
'status_final_log' => $statusFinalLog,
'final_log' =>$final_log,
'import_system' =>TRUE,
'catatan' => $row['catatan'],
'type_of_member' => $row['type_of_member'],
'total_cob' => $row['total_cob'],
'diagnosis' => $row['diagnosis'],
'keterangan' => $row['keterangan'],
'policy_id' => $member->currentPolicy->id ?? null,
'organization_id' => $organization_id,
'service_code' => $serviceCode,
'approved_final_log_at' => $row['approved_final_log_at'],
// 'code' => $code,
// 'member_id' => $member->id,
// 'submission_date' => $row['submission_date'],
// 'discharge_date' => $row['discharge_date'],
// 'payment_type' => 'cashless',
// 'status' => $status,
// 'status_final_log' => $statusFinalLog,
// 'final_log' =>$final_log,
// 'import_system' =>TRUE,
// 'catatan' => $row['catatan'],
// 'type_of_member' => $row['type_of_member'],
// 'total_cob' => $row['total_cob'],
// 'diagnosis' => $row['diagnosis'],
// 'keterangan' => $row['keterangan'],
// 'policy_id' => $member->currentPolicy->id ?? null,
// 'organization_id' => $organization_id,
// 'service_code' => $serviceCode,
// 'approved_final_log_at' => $row['approved_final_log_at'],
];
}
@@ -302,7 +302,7 @@ class RequestLogService
}
if ($benefit) { // jika tidak ada benefit nya maka belum ngisi benefit nya
// Delete item
// Delete item
if ($row['total_billing']){
RequestLogBenefit::where('request_log_id', '=', $requestLog->id)->delete();
}