chore: fix bug in unlink_asset_reference

This commit is contained in:
anandbaburajan 2022-12-06 23:34:56 +05:30
parent 2cd42dbb10
commit 18fc2b5695

View File

@ -293,6 +293,10 @@ class JournalEntry(AccountsController):
depr_schedule = get_depr_schedule_from_asset_depr_schedule_of_asset(
asset.name, row.finance_book
)
if not depr_schedule:
return
for s in depr_schedule:
if s.journal_entry == self.name:
s.db_set("journal_entry", None)