mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 21:35:19 +00:00
[minor] left aligned email footer, raise duplicate entry error for common email id in Employee and Sales Person
This commit is contained in:
@@ -27,7 +27,7 @@ class SalesPerson(NestedSet):
|
||||
frappe.throw(_("User ID not set for Employee {0}").format(self.employee))
|
||||
else:
|
||||
return frappe.db.get_value("User", user, "email") or user
|
||||
|
||||
|
||||
def validate_employee_id(self):
|
||||
if frappe.db.exists({"doctype": "Sales Person","employee": self.employee}):
|
||||
frappe.throw("Another sales person with the same employee id exists.")
|
||||
frappe.throw("Another sales person with the same employee id exists.", frappe.DuplicateEntryError)
|
||||
|
||||
Reference in New Issue
Block a user