From b717e2b5bf9a7ddcb47b4b496cb1d815fc2909a4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:44:22 +0530 Subject: [PATCH] chore: don't merge asset capitalization gl entries (copy #36514) (#36515) chore: don't merge asset capitalization gl entries (cherry picked from commit 3c8f292ac3943ddad52a7041d8910552d47abf0a) Co-authored-by: anandbaburajan --- .../doctype/asset_capitalization/asset_capitalization.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index 858c1db43c..324b7392a8 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -330,7 +330,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) @@ -360,9 +360,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