mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
simplify the condition to check if value is larger then max amount
This commit is contained in:
parent
4fcb54ff7c
commit
093a297856
@ -107,7 +107,7 @@ module.exports = {
|
||||
validate(value, doc) {
|
||||
const amount = doc.getSum('for', 'amount');
|
||||
|
||||
if (!(amount >= value)) {
|
||||
if (value > amount)) {
|
||||
throw new frappe.errors.ValidationError(
|
||||
frappe._(
|
||||
`Payment amount cannot exceed ${frappe.format(
|
||||
|
Loading…
Reference in New Issue
Block a user