mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
fix: linters related fix
This commit is contained in:
@@ -135,7 +135,7 @@ frappe.ui.form.on("Asset", {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_list(["Submitted", "Partially Depreciated"], frm.doc.status)) {
|
if (["Submitted", "Partially Depreciated"].includes(frm.doc.status)) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Adjust Asset Value"),
|
__("Adjust Asset Value"),
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ class AssetRepair(AccountsController):
|
|||||||
|
|
||||||
self.asset_doc.flags.ignore_validate_update_after_submit = True
|
self.asset_doc.flags.ignore_validate_update_after_submit = True
|
||||||
self.asset_doc.save()
|
self.asset_doc.save()
|
||||||
|
self.asset_doc.db_update()
|
||||||
|
|
||||||
def get_total_value_of_stock_consumed(self):
|
def get_total_value_of_stock_consumed(self):
|
||||||
return sum([flt(item.total_value) for item in self.get("stock_items")])
|
return sum([flt(item.total_value) for item in self.get("stock_items")])
|
||||||
@@ -241,7 +242,7 @@ class AssetRepair(AccountsController):
|
|||||||
|
|
||||||
def make_gl_entries(self, cancel=False):
|
def make_gl_entries(self, cancel=False):
|
||||||
if cancel:
|
if cancel:
|
||||||
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry")
|
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry") # nosemgrep
|
||||||
|
|
||||||
if flt(self.total_repair_cost) > 0:
|
if flt(self.total_repair_cost) > 0:
|
||||||
gl_entries = self.get_gl_entries()
|
gl_entries = self.get_gl_entries()
|
||||||
|
|||||||
Reference in New Issue
Block a user