From c03f275e7a6279999e86d3458e4a6e723257de45 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Tue, 7 Mar 2017 11:59:55 +0530 Subject: [PATCH] [minor] allowed the credit and debit amount to be 0 in JE --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 0f9b5d34bb..fc8966282b 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -37,16 +37,8 @@ class JournalEntry(AccountsController): self.validate_credit_debit_note() self.validate_empty_accounts_table() self.set_account_and_party_balance() - self.clear_zero_debit_credit_row() if not self.title: self.title = self.get_title() - - 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)] - - if not self.accounts: - frappe.throw("Debit or Credit amount is not found in account table") def on_submit(self): self.check_credit_limit()