Fix salary patch (#16531)

fix: salary structure assignment patch, add .vscode to gitignore
This commit is contained in:
Sagar Vora 2019-01-31 09:17:29 +05:30 committed by GitHub
parent 76728b87ab
commit 7ea2497b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -12,4 +12,5 @@ erpnext/docs/current
*.swo *.swo
__pycache__ __pycache__
*~ *~
.vscode/
node_modules/ node_modules/

View File

@ -20,7 +20,7 @@ class SalaryStructureAssignment(Document):
if self.from_date: if self.from_date:
if frappe.db.exists("Salary Structure Assignment", {"employee": self.employee, "from_date": self.from_date, "docstatus": 1}): if frappe.db.exists("Salary Structure Assignment", {"employee": self.employee, "from_date": self.from_date, "docstatus": 1}):
frappe.throw("Salary Structure Assignment for Employee already exists") frappe.throw(_("Salary Structure Assignment for Employee already exists"), DuplicateAssignment)
if joining_date and getdate(self.from_date) < joining_date: if joining_date and getdate(self.from_date) < joining_date:
frappe.throw(_("From Date {0} cannot be before employee's joining Date {1}") frappe.throw(_("From Date {0} cannot be before employee's joining Date {1}")