commit | 4567474418d159e6334c7b69c3a7f7f6ccc9741d | [log] [tgz] |
---|---|---|
author | ruthra kumar <ruthra@erpnext.com> | Tue Jun 20 07:23:51 2023 +0530 |
committer | ruthra kumar <ruthra@erpnext.com> | Tue Jun 20 12:44:08 2023 +0530 |
tree | e27bc338b32ea2f5874c5a7442dad8bb856a8521 | |
parent | 9d04af9ecc865b77e9408f621eed0c4d933aa543 [diff] |
refactor: allow '0' rounding allowance
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js index f51b90d..1ef5c83 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js
@@ -37,7 +37,7 @@ validate_rounding_loss: function(frm) { let allowance = frm.doc.rounding_loss_allowance; - if (!(allowance > 0 && allowance < 1)) { + if (!(allowance >= 0 && allowance < 1)) { frappe.throw(__("Rounding Loss Allowance should be between 0 and 1")); } },
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 4926006..598db64 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -22,7 +22,7 @@ self.set_total_gain_loss() def validate_rounding_loss_allowance(self): - if not (self.rounding_loss_allowance > 0 and self.rounding_loss_allowance < 1): + if not (self.rounding_loss_allowance >= 0 and self.rounding_loss_allowance < 1): frappe.throw(_("Rounding Loss Allowance should be between 0 and 1")) def set_total_gain_loss(self):