update import request log
This commit is contained in:
@@ -177,8 +177,6 @@ class RequestLogService
|
|||||||
$serviceCode = 'Unk';
|
$serviceCode = 'Unk';
|
||||||
}
|
}
|
||||||
|
|
||||||
$benefit = Benefit::where('code', $row['benefit_id'])->first();
|
|
||||||
|
|
||||||
$requestLog = RequestLog::updateOrCreate(
|
$requestLog = RequestLog::updateOrCreate(
|
||||||
[
|
[
|
||||||
'code' => $code
|
'code' => $code
|
||||||
@@ -190,7 +188,7 @@ class RequestLogService
|
|||||||
'discharge_date' => $row['submission_date'],
|
'discharge_date' => $row['submission_date'],
|
||||||
'payment_type' => 'cashless',
|
'payment_type' => 'cashless',
|
||||||
'status' => $status,
|
'status' => $status,
|
||||||
'status_final_log' => $status,
|
'status_final_log' => $row['status_final_log'] == 'Y' ? 1 : 0,
|
||||||
'final_log' =>$row['status_final_log'] == 'Y' ? 1 : 0,
|
'final_log' =>$row['status_final_log'] == 'Y' ? 1 : 0,
|
||||||
'import_system' =>TRUE,
|
'import_system' =>TRUE,
|
||||||
'catatan' => $row['catatan'],
|
'catatan' => $row['catatan'],
|
||||||
@@ -200,7 +198,9 @@ class RequestLogService
|
|||||||
'approved_final_log_at' => $row['approved_final_log_at'],
|
'approved_final_log_at' => $row['approved_final_log_at'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$requestLogBenefit = RequestLogBenefit::updateOrCreate(
|
$benefit = Benefit::where('code', $row['benefit_id'])->first();
|
||||||
|
if ($benefit) { // jika tidak ada benefit nya maka belum ngisi benefit nya
|
||||||
|
RequestLogBenefit::updateOrCreate(
|
||||||
[
|
[
|
||||||
'request_log_id' => $requestLog->id,
|
'request_log_id' => $requestLog->id,
|
||||||
],
|
],
|
||||||
@@ -214,6 +214,8 @@ class RequestLogService
|
|||||||
'created_by' => auth()->user()->id,
|
'created_by' => auth()->user()->id,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Commit transaksi
|
// Commit transaksi
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user