mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 06:08:25 +00:00
* fix: Cascade deletion for Company
(cherry picked from commit 2b2572b9b9)
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
This commit is contained in:
@@ -393,6 +393,10 @@ class Company(NestedSet):
|
||||
frappe.db.sql("delete from `tabPurchase Taxes and Charges Template` where company=%s", self.name)
|
||||
frappe.db.sql("delete from `tabItem Tax Template` where company=%s", self.name)
|
||||
|
||||
# delete Process Deferred Accounts if no GL Entry found
|
||||
if not frappe.db.get_value('GL Entry', {'company': self.name}):
|
||||
frappe.db.sql("delete from `tabProcess Deferred Accounting` where company=%s", self.name)
|
||||
|
||||
@frappe.whitelist()
|
||||
def enqueue_replace_abbr(company, old, new):
|
||||
kwargs = dict(queue="long", company=company, old=old, new=new)
|
||||
|
||||
Reference in New Issue
Block a user