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
80268886
Commit
80268886
authored
Dec 03, 2024
by
Chanon.u
Browse files
Add validate declaration no for short message
parent
2f963e22
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Livewire/Pages/ManualResponse/ManualResponse.php
View file @
80268886
...
...
@@ -294,7 +294,14 @@ class ManualResponse extends Component
}
//Validate profile production
if
(
in_array
(
$messageType
,
[
'XCDA'
,
'XCDR'
])
&&
$declarationNo
==
''
){
if
(
in_array
(
$messageType
,
[
'XCDA'
,
'XCDR'
,
'SDCA'
,
'SDCR'
])
&&
$declarationNo
==
''
){
return
[
"success"
=>
false
,
'message'
=>
'Cancel template is required "Declaration Number" field.'
];
}
if
(
str_starts_with
(
$messageType
,
"XCDA_"
)
&&
$declarationNo
==
''
){
return
[
"success"
=>
false
,
'message'
=>
'Cancel template is required "Declaration Number" field.'
...
...
database/migrations/2024_05_31_045505_create_master_response_templates.php
View file @
80268886
...
...
@@ -283,7 +283,7 @@ return new class extends Migration
'type'
=>
'SDCA'
,
'name'
=>
'SHORT DECLARATION ACCEPTED'
,
'description'
=>
''
,
'template'
=>
'{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"
I
DCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"ShortDeclarationAccept":{"DeclarationNumber":"","Message":"SHORT DECLARATION ACCEPTED"}}}}'
'template'
=>
'{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"
S
DCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"ShortDeclarationAccept":{"DeclarationNumber":"","Message":"SHORT DECLARATION ACCEPTED"}}}}'
],
[
'mid'
=>
4
,
...
...
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