Merge pull request #16842 from hrwX/additional_salary

fix(Additional Salary): Allow additional salary to be zero
This commit is contained in:
Prateeksha Singh 2019-03-05 17:34:37 +05:30 committed by GitHub
commit fb491a568f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,8 @@ from frappe.utils import getdate, date_diff
class AdditionalSalary(Document): class AdditionalSalary(Document):
def validate(self): def validate(self):
self.validate_dates() self.validate_dates()
if self.amount <= 0: if self.amount < 0:
frappe.throw(_("Amount should be greater than zero.")) frappe.throw(_("Amount should not be less than zero."))
def validate_dates(self): def validate_dates(self):
date_of_joining, relieving_date = frappe.db.get_value("Employee", self.employee, date_of_joining, relieving_date = frappe.db.get_value("Employee", self.employee,