mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
Merge pull request #6673 from KanchanChauhan/max-leave-days-in-leave-application-hotfix
[Fix] leave application days should be less than max days leave allowed
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user