fix: Replace post_depreciation_entries() with make_depreciation_entry()
This commit is contained in:
parent
0515b4b6f6
commit
82bf5e5539
@ -37,7 +37,7 @@ from erpnext.assets.doctype.asset.depreciation import (
|
|||||||
get_disposal_account_and_cost_center,
|
get_disposal_account_and_cost_center,
|
||||||
get_gl_entries_on_asset_disposal,
|
get_gl_entries_on_asset_disposal,
|
||||||
get_gl_entries_on_asset_regain,
|
get_gl_entries_on_asset_regain,
|
||||||
post_depreciation_entries,
|
make_depreciation_entry
|
||||||
)
|
)
|
||||||
from erpnext.controllers.selling_controller import SellingController
|
from erpnext.controllers.selling_controller import SellingController
|
||||||
from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data
|
from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data
|
||||||
@ -1001,7 +1001,7 @@ class SalesInvoice(SellingController):
|
|||||||
asset.prepare_depreciation_data(date_of_sale=self.posting_date)
|
asset.prepare_depreciation_data(date_of_sale=self.posting_date)
|
||||||
asset.save()
|
asset.save()
|
||||||
|
|
||||||
post_depreciation_entries(self.posting_date)
|
make_depreciation_entry(asset.name, self.posting_date)
|
||||||
|
|
||||||
def reset_depreciation_schedule(self, asset):
|
def reset_depreciation_schedule(self, asset):
|
||||||
asset.flags.ignore_validate_update_after_submit = True
|
asset.flags.ignore_validate_update_after_submit = True
|
||||||
|
Loading…
Reference in New Issue
Block a user