mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
fix: correct grammatical errors in asset movement validation messages
(cherry picked from commit 5f083d55b5)
This commit is contained in:
@@ -61,7 +61,7 @@ class AssetMovement(Document):
|
|||||||
if d.source_location:
|
if d.source_location:
|
||||||
if current_location != d.source_location:
|
if current_location != d.source_location:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Asset {0} does not belongs to the location {1}").format(d.asset, d.source_location)
|
_("Asset {0} does not belong to the location {1}").format(d.asset, d.source_location)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
d.source_location = current_location
|
d.source_location = current_location
|
||||||
@@ -75,7 +75,7 @@ class AssetMovement(Document):
|
|||||||
frappe.throw(_("Target Location is required while receiving Asset {0}").format(d.asset))
|
frappe.throw(_("Target Location is required while receiving Asset {0}").format(d.asset))
|
||||||
if d.to_employee and frappe.db.get_value("Employee", d.to_employee, "company") != self.company:
|
if d.to_employee and frappe.db.get_value("Employee", d.to_employee, "company") != self.company:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Employee {0} does not belongs to the company {1}").format(d.to_employee, self.company)
|
_("Employee {0} does not belong to the company {1}").format(d.to_employee, self.company)
|
||||||
)
|
)
|
||||||
|
|
||||||
def validate_employee(self, d):
|
def validate_employee(self, d):
|
||||||
@@ -88,7 +88,7 @@ class AssetMovement(Document):
|
|||||||
|
|
||||||
if current_custodian != d.from_employee:
|
if current_custodian != d.from_employee:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Asset {0} does not belongs to the custodian {1}").format(d.asset, d.from_employee)
|
_("Asset {0} does not belong to the custodian {1}").format(d.asset, d.from_employee)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not d.to_employee:
|
if not d.to_employee:
|
||||||
@@ -96,7 +96,7 @@ class AssetMovement(Document):
|
|||||||
|
|
||||||
if d.to_employee and frappe.db.get_value("Employee", d.to_employee, "company") != self.company:
|
if d.to_employee and frappe.db.get_value("Employee", d.to_employee, "company") != self.company:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Employee {0} does not belongs to the company {1}").format(d.to_employee, self.company)
|
_("Employee {0} does not belong to the company {1}").format(d.to_employee, self.company)
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user