fix: better gls for purchases with tax witholding (#42743)

* fix: better gls for purchases with tax witholding

* test: test case for purchase invoice gl entries with tax witholding

* fix: use flag `_skip_merge` instead of skipping merge based on against account

* test: fix test `test_single_threshold_tds` for newer implementation

(cherry picked from commit e3cd6539c3)
This commit is contained in:
Smit Vora
2024-11-09 15:14:21 +05:30
committed by Mergify
parent 4cde77d8d8
commit 705a26a2fa
4 changed files with 123 additions and 27 deletions

View File

@@ -234,6 +234,10 @@ def merge_similar_entries(gl_map, precision=None):
merge_properties = get_merge_properties(accounting_dimensions)
for entry in gl_map:
if entry._skip_merge:
merged_gl_map.append(entry)
continue
entry.merge_key = get_merge_key(entry, merge_properties)
# if there is already an entry in this account then just add it
# to that entry