Update journal_entry.py
This commit is contained in:
parent
43eeddfaf6
commit
d4e59aa54f
@ -42,9 +42,8 @@ class JournalEntry(AccountsController):
|
|||||||
self.title = self.get_title()
|
self.title = self.get_title()
|
||||||
|
|
||||||
def clear_zero_debit_credit_row(self):
|
def clear_zero_debit_credit_row(self):
|
||||||
self.accounts = [account for account in self.accounts if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
|
self.accounts = [account for account in self.accounts
|
||||||
frappe.db.sql("""delete from `tabJournal Entry Account` where parent = %s and debit = 0.0 and credit = 0.0""", self.name)
|
if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
|
||||||
|
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.check_credit_limit()
|
self.check_credit_limit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user