Commit 14743758 authored by Chanon.u's avatar Chanon.u
Browse files

Add gen error date and lock data for refere

parent dca149f8
...@@ -61,7 +61,7 @@ class GenXmlController extends Controller ...@@ -61,7 +61,7 @@ class GenXmlController extends Controller
$value = $this->generateGCLNo(); $value = $this->generateGCLNo();
} }
if(in_array($key, ['AuditDateTime'])){ if(in_array($key, ['AuditDateTime', 'ErrorDate'])){
$value = Carbon::now()->setTimezone('GMT+7')->format('Y-m-d\TH:i:s'); $value = Carbon::now()->setTimezone('GMT+7')->format('Y-m-d\TH:i:s');
} }
$child = $xml->addChild($key); $child = $xml->addChild($key);
......
...@@ -137,6 +137,10 @@ class ManualResponse extends Component ...@@ -137,6 +137,10 @@ class ManualResponse extends Component
if(isset($tmp_xmlData[$key]) && !in_array($key, $this->listNonLockData)){ if(isset($tmp_xmlData[$key]) && !in_array($key, $this->listNonLockData)){
$this->xmlData[$key] = $tmp_xmlData[$key]; $this->xmlData[$key] = $tmp_xmlData[$key];
} }
if(isset($tmp_xmlData['ReferenceNumber']) && isset($this->xmlData['ReferenceNo'])){
$this->xmlData['ReferenceNo'] = $tmp_xmlData['ReferenceNumber'];
}
} }
} }
...@@ -258,7 +262,7 @@ class ManualResponse extends Component ...@@ -258,7 +262,7 @@ class ManualResponse extends Component
private function validateBeforeSend(){ private function validateBeforeSend(){
$messageType = $this->xmlData['MessageType'] ?? ''; $messageType = $this->xmlData['MessageType'] ?? '';
$referenceNo = $this->xmlData['ReferenceNumber'] ?? ''; $referenceNo = $this->xmlData['ReferenceNumber'] ?? $this->xmlData['ReferenceNo'] ?? '';
$declarationNo = $this->xmlData['DeclarationNumber'] ?? ''; $declarationNo = $this->xmlData['DeclarationNumber'] ?? '';
$profileProds = ConfListProfile::where('type', 'PROD')->pluck('name')->toArray(); $profileProds = ConfListProfile::where('type', 'PROD')->pluck('name')->toArray();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment