Skip to content

Commit

Permalink
fix: removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
nabinhait committed Dec 11, 2024
1 parent adbba1b commit b8481d3
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions erpnext/assets/doctype/asset/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,6 @@ def on_cancel(self):
self.db_set("booked_fixed_asset", 0)
add_asset_activity(self.name, _("Asset cancelled"))

# def after_insert(self):
# if self.calculate_depreciation and not self.split_from:
# asset_depr_schedules_names = make_draft_asset_depr_schedules(self)
# asset_depr_schedules_links = get_comma_separated_links(
# asset_depr_schedules_names, "Asset Depreciation Schedule"
# )
# frappe.msgprint(
# _(
# "Asset Depreciation Schedules created:<br>{0}<br><br>Please check, edit if needed, and submit the Asset."
# ).format(asset_depr_schedules_links)
# )
if (
not frappe.db.exists(
{
Expand Down Expand Up @@ -322,22 +311,6 @@ def validate_finance_books(self):
title=_("Missing Finance Book"),
)

# def set_depreciation_start_date(self):
# if not self.calculate_depreciation:
# return

# for d in self.get("finance_books"):
# if not d.depreciation_start_date:
# if self.is_existing_asset and self.opening_number_of_booked_depreciations:

# months = d.frequency_of_depreciation * self.opening_number_of_booked_depreciations
# else:
# months = d.frequency_of_depreciation

# d.depreciation_start_date = get_last_day(
# add_months(self.available_for_use_date, months)
# )

def validate_precision(self):
float_precision = cint(frappe.db.get_default("float_precision")) or 2
if self.gross_purchase_amount:
Expand Down

0 comments on commit b8481d3

Please sign in to comment.