fix: Mandatory bank account error fix

This commit is contained in:
Deepesh Garg
2020-02-26 15:04:43 +05:30
parent b26fd04843
commit 6f35a63f2d

View File

@@ -13,9 +13,11 @@ form_grid_templates = {
class BankReconciliation(Document):
def get_payment_entries(self):
if not (self.bank_account and self.from_date and self.to_date):
msgprint(_("Bank Account, From Date and To Date are Mandatory"))
return
if not (self.from_date and self.to_date):
frappe.throw(_("From Date and To Date are Mandatory"))
if not self.account:
frappe.throw(_("Account is mandatory to get payment entries"))
condition = ""
if not self.include_reconciled_entries: