Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
6377f0d0
Commit
6377f0d0
authored
Dec 02, 2024
by
Chanon.u
Browse files
Update cancel matching for no gen declaration no.
parent
e7a7151c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Livewire/Pages/ManualResponse/ManualResponse.php
View file @
6377f0d0
...
...
@@ -132,6 +132,12 @@ class ManualResponse extends Component
$this
->
xmlContent
=
$xml
[
'xmlContent'
];
$this
->
xmlData
=
$xml
[
'xmlWithData'
];
//For response Export: 9904: Goods Transition Control Already Cancel Matching -> No auto-gen Declaration Number.
$messageCode
=
MasterResponseTemplates
::
where
(
'id'
,
$this
->
docType
)
->
value
(
'code'
)
??
''
;
if
(
$messageCode
==
'9904'
){
$this
->
xmlData
[
'DeclarationNumber'
]
=
''
;
}
if
(
$this
->
lockData
){
foreach
(
$this
->
xmlData
as
$key
=>
$val
){
if
(
isset
(
$tmp_xmlData
[
$key
])
&&
!
in_array
(
$key
,
$this
->
listNonLockData
)){
...
...
@@ -228,7 +234,7 @@ class ManualResponse extends Component
'detail'
=>
"Username: "
.
$userConnect
->
username
.
"
\n
Link: "
.
$userConnect
->
link
,
'xml_content'
=>
base64_encode
(
$this
->
xmlContent
),
'reference_number'
=>
$this
->
xmlData
[
'ReferenceNumber'
]
??
$this
->
xmlData
[
'ReferenceNo'
]
??
''
,
'declaration_number'
=>
$this
->
xmlData
[
'DeclarationNumber'
]
??
''
,
'declaration_number'
=>
$this
->
xmlData
[
'DeclarationNumber'
]
??
$this
->
xmlData
[
'DocumentNumber'
]
??
''
,
'link'
=>
$userConnect
->
link
]);
...
...
@@ -263,7 +269,7 @@ class ManualResponse extends Component
private
function
validateBeforeSend
(){
$messageType
=
$this
->
xmlData
[
'MessageType'
]
??
''
;
$referenceNo
=
$this
->
xmlData
[
'ReferenceNumber'
]
??
$this
->
xmlData
[
'ReferenceNo'
]
??
''
;
$declarationNo
=
$this
->
xmlData
[
'DeclarationNumber'
]
??
''
;
$declarationNo
=
$this
->
xmlData
[
'DeclarationNumber'
]
??
$this
->
xmlData
[
'DocumentNumber'
]
??
''
;
$profileProds
=
ConfListProfile
::
where
(
'type'
,
'PROD'
)
->
pluck
(
'name'
)
->
toArray
();
//Validate reference number format
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment