Merge pull request #733 from abhishek-webkul/gli-1494

Fixed: Admin can not set refund amount to 0 when creating refund rules
This commit is contained in:
Rohit Jain
2023-09-07 15:35:32 +05:30
committed by GitHub

View File

@@ -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.');
}