From 7ea2497b9aa901685d3d0bf9505b80a5d18f9c39 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 31 Jan 2019 09:17:29 +0530 Subject: [PATCH] Fix salary patch (#16531) fix: salary structure assignment patch, add .vscode to gitignore --- .gitignore | 1 + .../salary_structure_assignment/salary_structure_assignment.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 16522447c2..473a621326 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ erpnext/docs/current *.swo __pycache__ *~ +.vscode/ node_modules/ \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py index cf0906687c..668e0ec471 100644 --- a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py +++ b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py @@ -20,7 +20,7 @@ class SalaryStructureAssignment(Document): if self.from_date: 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: frappe.throw(_("From Date {0} cannot be before employee's joining Date {1}")