Skip to content

Commit

Permalink
fix: Total debit and credit while importing via Data Import (#34659)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 authored Mar 30, 2023
1 parent c4a0842 commit 7c42b72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def validate(self):
self.validate_multi_currency()
self.set_amounts_in_company_currency()
self.validate_debit_credit_amount()

self.set_total_debit_credit()
# Do not validate while importing via data import
if not frappe.flags.in_import:
self.validate_total_debit_and_credit()
Expand Down Expand Up @@ -666,7 +666,6 @@ def validate_debit_credit_amount(self):
frappe.throw(_("Row {0}: Both Debit and Credit values cannot be zero").format(d.idx))

def validate_total_debit_and_credit(self):
self.set_total_debit_credit()
if not (self.voucher_type == "Exchange Gain Or Loss" and self.multi_currency):
if self.difference:
frappe.throw(
Expand Down

0 comments on commit 7c42b72

Please sign in to comment.