mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-25 04:53:01 +00:00
fix: Issues regarding asset cancellation and deletion
(cherry picked from commit 17f85de6fb)
# Conflicts:
# erpnext/assets/doctype/asset/depreciation.py
# erpnext/assets/doctype/asset_capitalization/asset_capitalization.py
This commit is contained in:
@@ -824,7 +824,8 @@ class BuyingController(SubcontractingController):
|
||||
if self.doctype == "Purchase Invoice" and not self.get("update_stock"):
|
||||
return
|
||||
|
||||
frappe.db.sql("delete from `tabAsset Movement` where reference_name=%s", self.name)
|
||||
asset_movement = frappe.db.get_value("Asset Movement", {"reference_name": self.name}, "name")
|
||||
frappe.delete_doc("Asset Movement", asset_movement, force=1)
|
||||
|
||||
def validate_schedule_date(self):
|
||||
if not self.get("items"):
|
||||
|
||||
Reference in New Issue
Block a user