update code
This commit is contained in:
@@ -172,8 +172,11 @@ class CorporateFormulariumController extends Controller
|
||||
}
|
||||
|
||||
// Write Header to File
|
||||
$result_headers = array_merge($doc_headers_indexes, ['Ingest Code', 'Ingest Note']);
|
||||
$import->addArrayToRow($result_headers);
|
||||
// $result_headers = array_merge($doc_headers_indexes, ['Ingest Code', 'Ingest Note']);
|
||||
// Tambahkan 'Ingest Code' dan 'Ingest Note' ke akhir array
|
||||
$doc_headers_indexes[] = 'Ingest Code';
|
||||
$doc_headers_indexes[] = 'Ingest Note';
|
||||
$import->addArrayToRow($doc_headers_indexes);
|
||||
|
||||
// TODO Validate if First Row not Header
|
||||
} else { // Next Row Should be Data
|
||||
@@ -196,7 +199,7 @@ class CorporateFormulariumController extends Controller
|
||||
|
||||
try { // Process the Row Data
|
||||
if (empty($row_data['code'])){
|
||||
throw new ImportRowException(__('Internal Code is REQUIRED'), 0, null, $row);
|
||||
throw new ImportRowException(__('Internal Code is REQUIRED'), 405, null, $row_data);
|
||||
}
|
||||
if (
|
||||
// empty($row_data['code']) &&
|
||||
@@ -212,7 +215,7 @@ class CorporateFormulariumController extends Controller
|
||||
if ($formulariums){
|
||||
$row_data['formularium_id'] = $formulariums->id;
|
||||
} else {
|
||||
throw new ImportRowException(__('Internal Code is Not Found'), 0, null, $row);
|
||||
throw new ImportRowException(__('Internal Code is Not Found'), 405, null, $row_data);
|
||||
}
|
||||
$formulariumService = new FormulariumService();
|
||||
$formulariumService->handleFormuariumCorporateRow($row_data, $id);
|
||||
|
||||
Reference in New Issue
Block a user