update code
This commit is contained in:
@@ -172,8 +172,11 @@ class CorporateFormulariumController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write Header to File
|
// Write Header to File
|
||||||
$result_headers = array_merge($doc_headers_indexes, ['Ingest Code', 'Ingest Note']);
|
// $result_headers = array_merge($doc_headers_indexes, ['Ingest Code', 'Ingest Note']);
|
||||||
$import->addArrayToRow($result_headers);
|
// 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
|
// TODO Validate if First Row not Header
|
||||||
} else { // Next Row Should be Data
|
} else { // Next Row Should be Data
|
||||||
@@ -196,7 +199,7 @@ class CorporateFormulariumController extends Controller
|
|||||||
|
|
||||||
try { // Process the Row Data
|
try { // Process the Row Data
|
||||||
if (empty($row_data['code'])){
|
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 (
|
if (
|
||||||
// empty($row_data['code']) &&
|
// empty($row_data['code']) &&
|
||||||
@@ -212,7 +215,7 @@ class CorporateFormulariumController extends Controller
|
|||||||
if ($formulariums){
|
if ($formulariums){
|
||||||
$row_data['formularium_id'] = $formulariums->id;
|
$row_data['formularium_id'] = $formulariums->id;
|
||||||
} else {
|
} 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 = new FormulariumService();
|
||||||
$formulariumService->handleFormuariumCorporateRow($row_data, $id);
|
$formulariumService->handleFormuariumCorporateRow($row_data, $id);
|
||||||
|
|||||||
Reference in New Issue
Block a user