fix: Replace post_depreciation_entries() with make_depreciation_entry()

(cherry picked from commit 82bf5e5539)
This commit is contained in:
GangaManoj
2021-10-26 20:53:47 +05:30
committed by mergify-bot
parent 92ebe52432
commit 5146985a66

View File

@@ -36,7 +36,7 @@ from erpnext.assets.doctype.asset.depreciation import (
get_disposal_account_and_cost_center,
get_gl_entries_on_asset_disposal,
get_gl_entries_on_asset_regain,
post_depreciation_entries,
make_depreciation_entry
)
from erpnext.controllers.selling_controller import SellingController
from erpnext.healthcare.utils import manage_invoice_submit_cancel
@@ -1010,7 +1010,7 @@ class SalesInvoice(SellingController):
asset.prepare_depreciation_data(date_of_sale=self.posting_date)
asset.save()
post_depreciation_entries(self.posting_date)
make_depreciation_entry(asset.name, self.posting_date)
def reset_depreciation_schedule(self, asset):
asset.flags.ignore_validate_update_after_submit = True