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
  • Loading branch information
Navin-S-R committed Sep 14, 2024
1 parent ce34bb9 commit b634aa9
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 @@ -3570,6 +3570,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 b634aa9

Please sign in to comment.