chore: don't merge asset capitalization gl entries (backport #36514) (#36516)

chore: don't merge asset capitalization gl entries (#36514)

(cherry picked from commit 2d7d86039a)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
mergify[bot]
2023-08-07 00:20:53 +05:30
committed by GitHub
parent 2d43ba0c90
commit 8770aa5955

View File

@@ -325,7 +325,7 @@ class AssetCapitalization(StockController):
gl_entries = self.get_gl_entries()
if gl_entries:
make_gl_entries(gl_entries, from_repost=from_repost)
make_gl_entries(gl_entries, merge_entries=False, from_repost=from_repost)
elif self.docstatus == 2:
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
@@ -355,9 +355,6 @@ class AssetCapitalization(StockController):
gl_entries, target_account, target_against, precision
)
if not self.stock_items and not self.service_items and self.are_all_asset_items_non_depreciable:
return []
self.get_gl_entries_for_target_item(gl_entries, target_against, precision)
return gl_entries