mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
fix: KeyError about bank_account_no due to non-existent field: #20343
This commit is contained in:
@@ -68,11 +68,10 @@ class BankReconciliation(Document):
|
|||||||
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
|
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
|
||||||
where
|
where
|
||||||
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
|
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
|
||||||
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s {0}
|
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s
|
||||||
order by
|
order by
|
||||||
si.posting_date ASC, si.name DESC
|
si.posting_date ASC, si.name DESC
|
||||||
""".format(condition),
|
""", {"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
|
||||||
{"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
|
|
||||||
|
|
||||||
entries = sorted(list(payment_entries)+list(journal_entries+list(pos_entries)),
|
entries = sorted(list(payment_entries)+list(journal_entries+list(pos_entries)),
|
||||||
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
||||||
|
|||||||
Reference in New Issue
Block a user