Allow 0 deduction value for refund rules

This commit is contained in:
Abhishek Kumar
2023-07-31 12:08:44 +05:30
parent ccace94c38
commit c0d436cf73

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