mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-08 15:51:19 +00:00
refactor: validate debit and credit on before_submit
This commit is contained in:
@@ -181,11 +181,12 @@ class JournalEntry(AccountsController):
|
|||||||
else:
|
else:
|
||||||
return self._cancel()
|
return self._cancel()
|
||||||
|
|
||||||
def on_submit(self):
|
def before_submit(self):
|
||||||
# Do not validate while importing via data import
|
# Do not validate while importing via data import
|
||||||
if not frappe.flags.in_import:
|
if not frappe.flags.in_import:
|
||||||
self.validate_total_debit_and_credit()
|
self.validate_total_debit_and_credit()
|
||||||
|
|
||||||
|
def on_submit(self):
|
||||||
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