chore: remove unused function
This commit is contained in:
parent
f1169fb213
commit
28952eda87
@ -654,7 +654,7 @@ class Asset(AccountsController):
|
||||
self.db_set("status", status)
|
||||
|
||||
def get_status(self):
|
||||
"""Returns status based on whether it is draft, submitted, sold, scrapped or depreciated"""
|
||||
"""Returns status based on whether it is draft, submitted, scrapped or depreciated"""
|
||||
if self.docstatus == 0:
|
||||
status = "Draft"
|
||||
elif self.docstatus == 1:
|
||||
@ -676,21 +676,6 @@ class Asset(AccountsController):
|
||||
status = "Cancelled"
|
||||
return status
|
||||
|
||||
def is_sold(self):
|
||||
item = frappe.qb.DocType("Sales Invoice Item").as_("item")
|
||||
si = frappe.qb.DocType("Sales Invoice").as_("si")
|
||||
|
||||
asset_sales_invoice = (
|
||||
frappe.qb.from_(item)
|
||||
.select(item.parent)
|
||||
.inner_join(si)
|
||||
.on(item.parent == si.name)
|
||||
.where(item.asset == self.name)
|
||||
.where(si.docstatus == 1)
|
||||
).run()
|
||||
|
||||
return True if asset_sales_invoice else False
|
||||
|
||||
def get_default_finance_book_idx(self):
|
||||
if not self.get("default_finance_book") and self.company:
|
||||
self.default_finance_book = erpnext.get_default_finance_book(self.company)
|
||||
|
Loading…
Reference in New Issue
Block a user