Updated: Validation for refund voucher creation and action of the refund form in Admin refund request controller
This commit is contained in:
@@ -326,10 +326,13 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
} else {
|
||||
$this->errors[] = $this->l('Invalid refund state.');
|
||||
}
|
||||
if (!$voucher_expiry_date = Tools::getValue('voucher_expiry_date')) {
|
||||
$this->errors[] = $this->l('Voucher expiry date is required.');
|
||||
} elseif (!Validate::isDate($voucher_expiry_date)) {
|
||||
$this->errors[] = $this->l('Invalid voucher expiry date.');
|
||||
|
||||
if (Tools::isSubmit('generateDiscount')) {
|
||||
if (!$voucher_expiry_date = Tools::getValue('voucher_expiry_date')) {
|
||||
$this->errors[] = $this->l('Voucher expiry date is required.');
|
||||
} elseif (!Validate::isDate($voucher_expiry_date)) {
|
||||
$this->errors[] = $this->l('Invalid voucher expiry date.');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = $this->l('Invalid refund information found.');
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<i class="icon-info-circle"></i> {l s='Order Cancellation Request Information' mod='hotelreservationsystem'}
|
||||
</div>
|
||||
<br>
|
||||
<form id="{$table|escape:'htmlall':'UTF-8'}_form" class="defaultForm {$name_controller|escape:'htmlall':'UTF-8'} form-horizontal" action="{$current|escape:'htmlall':'UTF-8'}&{if !empty($submit_action)}{$submit_action|escape:'htmlall':'UTF-8'}{/if}&token={$token|escape:'htmlall':'UTF-8'}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style|escape:'htmlall':'UTF-8'}"{/if}>
|
||||
<form id="{$table|escape:'htmlall':'UTF-8'}_form" class="defaultForm {$name_controller|escape:'htmlall':'UTF-8'} form-horizontal" action="{$link->getAdminLink('AdminOrderRefundRequests')|escape:'html':'UTF-8'}&vieworder_return&id_order_return={$orderReturnInfo['id']|escape:'html':'UTF-8'|intval}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style|escape:'htmlall':'UTF-8'}"{/if}>
|
||||
<div class="panel">
|
||||
{if isset($customer_name)}
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user