mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 19:55:29 +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:
|
if employee and employee != asset.custodian:
|
||||||
frappe.db.set_value("Asset", asset_id, "custodian", employee)
|
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:
|
if location and location != asset.location:
|
||||||
frappe.db.set_value("Asset", asset_id, "location", location)
|
frappe.db.set_value("Asset", asset_id, "location", location)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user