add kolom import system
This commit is contained in:
@@ -167,7 +167,8 @@ class ReportLogController extends Controller
|
|||||||
'Duration GL',
|
'Duration GL',
|
||||||
'Duration FGL',
|
'Duration FGL',
|
||||||
'Status GL',
|
'Status GL',
|
||||||
'Status Final GL'
|
'Status Final GL',
|
||||||
|
'Import By Excel'
|
||||||
];
|
];
|
||||||
// Sheet 1
|
// Sheet 1
|
||||||
$writer->getCurrentSheet()->setName('Data');
|
$writer->getCurrentSheet()->setName('Data');
|
||||||
@@ -204,7 +205,15 @@ class ReportLogController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$durationGl = Helper::differenceTime($formattedDateTime, $row['submission_date']);
|
$durationGl = Helper::differenceTime($formattedDateTime, $row['submission_date']);
|
||||||
|
|
||||||
|
$approveByFgl = '-';
|
||||||
|
if ($row['import_system']) {
|
||||||
|
$approveByFgl = 'Import By Excel';
|
||||||
|
} else if ($row['final_log'] == 1 && $row['status_final_log'] == 'requested'){
|
||||||
|
$approveByFgl = '-';
|
||||||
|
} else {
|
||||||
|
$approveByFgl = Helper::userName($row['approved_final_log_by']);
|
||||||
|
}
|
||||||
|
|
||||||
$rowData = [
|
$rowData = [
|
||||||
$row['code'], // code
|
$row['code'], // code
|
||||||
@@ -214,7 +223,7 @@ class ReportLogController extends Controller
|
|||||||
Helper::userName($row['approved_by']), // created by
|
Helper::userName($row['approved_by']), // created by
|
||||||
$created_final_at ? $created_final_at : "-", // fgl create time
|
$created_final_at ? $created_final_at : "-", // fgl create time
|
||||||
$row['approved_final_log_at'] ? $row['approved_final_log_at'] : "", // fgl submit time
|
$row['approved_final_log_at'] ? $row['approved_final_log_at'] : "", // fgl submit time
|
||||||
$row['final_log'] == 1 ? Helper::userName($row['approved_final_log_by']) : '-', // fgl create by
|
$approveByFgl, // fgl create by
|
||||||
$serviceName, // service
|
$serviceName, // service
|
||||||
$provider ? $provider->name : '-', // provider
|
$provider ? $provider->name : '-', // provider
|
||||||
count($documentQty), // dokument qty
|
count($documentQty), // dokument qty
|
||||||
@@ -222,6 +231,7 @@ class ReportLogController extends Controller
|
|||||||
$row['final_log'] == 1 ? $durationFinalGl : '-', // duration fgl
|
$row['final_log'] == 1 ? $durationFinalGl : '-', // duration fgl
|
||||||
$row['status'] ?? '-', // status gl
|
$row['status'] ?? '-', // status gl
|
||||||
$row['status_final_log'] ?? '-', // status fgl
|
$row['status_final_log'] ?? '-', // status fgl
|
||||||
|
$row['import_system'] == 1 ? 'True' : 'False', // status fgl
|
||||||
];
|
];
|
||||||
$row = WriterEntityFactory::createRowFromArray($rowData);
|
$row = WriterEntityFactory::createRowFromArray($rowData);
|
||||||
$writer->addRow($row);
|
$writer->addRow($row);
|
||||||
|
|||||||
@@ -40,7 +40,14 @@ class ReportLogResource extends JsonResource
|
|||||||
}
|
}
|
||||||
|
|
||||||
$durationGl = Helper::differenceTime($formattedDateTime, $this->submission_date);
|
$durationGl = Helper::differenceTime($formattedDateTime, $this->submission_date);
|
||||||
|
$approveByFgl = '-';
|
||||||
|
if ($this->import_system) {
|
||||||
|
$approveByFgl = 'Import By Excel';
|
||||||
|
} else if ($this->final_log == 1 && $this->status_final_log == 'requested'){
|
||||||
|
$approveByFgl = '-';
|
||||||
|
} else {
|
||||||
|
$approveByFgl = Helper::userName($this->approved_final_log_by);
|
||||||
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
|
|||||||
Reference in New Issue
Block a user