journal entry - accounts table cannot be blank - validation added
This commit is contained in:
parent
ceb04726c8
commit
934d63de16
@ -39,6 +39,7 @@ class JournalEntry(AccountsController):
|
|||||||
self.check_credit_days()
|
self.check_credit_days()
|
||||||
self.validate_expense_claim()
|
self.validate_expense_claim()
|
||||||
self.validate_credit_debit_note()
|
self.validate_credit_debit_note()
|
||||||
|
self.validate_accounts()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.check_credit_limit()
|
self.check_credit_limit()
|
||||||
@ -450,6 +451,10 @@ class JournalEntry(AccountsController):
|
|||||||
})
|
})
|
||||||
if count:
|
if count:
|
||||||
frappe.throw(_("{0} already made against stock entry {1}".format(self.voucher_type, self.stock_entry)))
|
frappe.throw(_("{0} already made against stock entry {1}".format(self.voucher_type, self.stock_entry)))
|
||||||
|
|
||||||
|
def validate_accounts(self):
|
||||||
|
if not self.accounts:
|
||||||
|
frappe.throw("Accounts table cannot be blank.")
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
|
def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user