[Fix] leave application days should be less than max days leave allowed
This commit is contained in:
parent
d5e52bc251
commit
24d580206a
@ -193,7 +193,7 @@ class LeaveApplication(Document):
|
||||
|
||||
def validate_max_days(self):
|
||||
max_days = frappe.db.get_value("Leave Type", self.leave_type, "max_days_allowed")
|
||||
if max_days and self.total_leave_days > max_days:
|
||||
if max_days and self.total_leave_days > cint(max_days):
|
||||
frappe.throw(_("Leave of type {0} cannot be longer than {1}").format(self.leave_type, max_days))
|
||||
|
||||
def validate_leave_approver(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user