Skip to content

Commit

Permalink
fix: map rows on journal entry by validating account, party, debit an…
Browse files Browse the repository at this point in the history
…d credit value

(cherry picked from commit b634aa9)
  • Loading branch information
Navin-S-R authored and mergify[bot] committed Sep 17, 2024
1 parent 5fe347c commit 86e1818
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3535,6 +3535,13 @@ def check_if_child_table_updated(child_table_before_update, child_table_after_up

# Check if any field affecting accounting entry is altered
for index, item in enumerate(child_table_before_update):
if item.parenttype == "Journal Entry" and any(
[
child_table_after_update[index].get(i) != item.get(i)
for i in ["account", "party_type", "party", "debit", "credit"]
]
):
continue
for field in fields_to_check:
if child_table_after_update[index].get(field) != item.get(field):
return True
Expand Down

0 comments on commit 86e1818

Please sign in to comment.