mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 18:54:55 +00:00
fix: clear asset custodian when asset take back from employee without assign to another employee
This commit is contained in:
@@ -144,6 +144,10 @@ class AssetMovement(Document):
|
||||
|
||||
if employee and employee != asset.custodian:
|
||||
frappe.db.set_value("Asset", asset_id, "custodian", employee)
|
||||
|
||||
elif not employee and asset.custodian:
|
||||
frappe.db.set_value("Asset", asset_id, "custodian", None)
|
||||
|
||||
if location and location != asset.location:
|
||||
frappe.db.set_value("Asset", asset_id, "location", location)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user