fix: move validate_total_debit_and_credit from validate to on_submit in Journal Entry
(cherry picked from commit 8b5d4c0236)
This commit is contained in:
@@ -127,9 +127,6 @@ class JournalEntry(AccountsController):
|
|||||||
self.set_amounts_in_company_currency()
|
self.set_amounts_in_company_currency()
|
||||||
self.validate_debit_credit_amount()
|
self.validate_debit_credit_amount()
|
||||||
self.set_total_debit_credit()
|
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()
|
|
||||||
|
|
||||||
if not frappe.flags.is_reverse_depr_entry:
|
if not frappe.flags.is_reverse_depr_entry:
|
||||||
self.validate_against_jv()
|
self.validate_against_jv()
|
||||||
@@ -185,6 +182,10 @@ class JournalEntry(AccountsController):
|
|||||||
return self._cancel()
|
return self._cancel()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
|
# Do not validate while importing via data import
|
||||||
|
if not frappe.flags.in_import:
|
||||||
|
self.validate_total_debit_and_credit()
|
||||||
|
|
||||||
self.validate_cheque_info()
|
self.validate_cheque_info()
|
||||||
self.check_credit_limit()
|
self.check_credit_limit()
|
||||||
self.make_gl_entries()
|
self.make_gl_entries()
|
||||||
|
|||||||
Reference in New Issue
Block a user