From c0d436cf73d5ea739f43f8f16ee28af189afd5fa Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 31 Jul 2023 12:08:44 +0530 Subject: [PATCH] Allow 0 deduction value for refund rules --- .../controllers/admin/AdminOrderRefundRulesController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php index ffcf6ec19..c03062ce6 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRulesController.php @@ -213,10 +213,10 @@ class AdminOrderRefundRulesController extends ModuleAdminController if ($paymentType == '') { $this->errors[] = $this->l('Invalid payment type.'); } - if (!$fullPayAmount) { + if (!$fullPayAmount && floatval($fullPayAmount) != 0) { $this->errors[] = $this->l('Enter deduction value for full payment.'); } - if (!$advPayAmount) { + if (!$advPayAmount && floatval($advPayAmount) != 0) { $this->errors[] = $this->l('Enter deduction value for advance payment.'); }