Commit 06f35752 authored by Chanon.u's avatar Chanon.u
Browse files

Fix incorrect alert message for cancel response

parent a8365c22
......@@ -300,11 +300,16 @@ class ManualResponse extends Component
}
//Validate profile production
if(in_array($messageType, ['XCDA', 'XCDR', 'SDCA', 'SDCR']) && $declarationNo == ''){
if(in_array($messageType, ['XCDA', 'XCDR']) && $declarationNo == ''){
return [
"success" => false,
'message' => 'Cancel template is required "Declaration Number" field.'
];
}else if(in_array($messageType, ['SDCA', 'SDCR']) && $declarationNo == ''){
return [
"success" => false,
'message' => 'Short template is required "Declaration Number" field.'
];
}
if(str_starts_with($messageType, "XCDA_") && $declarationNo == ''){
......
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