mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-14 18:23:55 +00:00
fix: resolve conflict
This commit is contained in:
@@ -142,23 +142,10 @@ class AssetMovement(Document):
|
|||||||
def update_asset_location_and_custodian(self, asset_id, location, employee):
|
def update_asset_location_and_custodian(self, asset_id, location, employee):
|
||||||
asset = frappe.get_doc("Asset", asset_id)
|
asset = frappe.get_doc("Asset", asset_id)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
updates = {}
|
|
||||||
if employee and employee != asset.custodian:
|
|
||||||
updates["custodian"] = employee
|
|
||||||
|
|
||||||
elif not employee and asset.custodian:
|
|
||||||
updates["custodian"] = ""
|
|
||||||
|
|
||||||
=======
|
|
||||||
if cstr(employee) != asset.custodian:
|
if cstr(employee) != asset.custodian:
|
||||||
frappe.db.set_value("Asset", asset_id, "custodian", cstr(employee))
|
frappe.db.set_value("Asset", asset_id, "custodian", cstr(employee))
|
||||||
>>>>>>> 323d8eaccd (fix(asset movement): clear custodian if not present)
|
|
||||||
if location and location != asset.location:
|
if location and location != asset.location:
|
||||||
updates["location"] = location
|
frappe.db.set_value("Asset", asset_id, "location", location)
|
||||||
|
|
||||||
if updates:
|
|
||||||
frappe.db.set_value("Asset", asset_id, updates)
|
|
||||||
|
|
||||||
def log_asset_activity(self, asset_id, location, employee):
|
def log_asset_activity(self, asset_id, location, employee):
|
||||||
if location and employee:
|
if location and employee:
|
||||||
|
|||||||
Reference in New Issue
Block a user