mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 07:15:11 +00:00
fix: don't filter payment entries on Bank Account in Payment Clearance
This commit is contained in:
@@ -46,9 +46,6 @@ class BankClearance(Document):
|
|||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.bank_account:
|
|
||||||
condition += "and bank_account = %(bank_account)s"
|
|
||||||
|
|
||||||
payment_entries = frappe.db.sql(
|
payment_entries = frappe.db.sql(
|
||||||
f"""
|
f"""
|
||||||
select
|
select
|
||||||
@@ -70,7 +67,6 @@ class BankClearance(Document):
|
|||||||
"account": self.account,
|
"account": self.account,
|
||||||
"from": self.from_date,
|
"from": self.from_date,
|
||||||
"to": self.to_date,
|
"to": self.to_date,
|
||||||
"bank_account": self.bank_account,
|
|
||||||
},
|
},
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
@@ -93,7 +89,7 @@ class BankClearance(Document):
|
|||||||
.where(loan_disbursement.docstatus == 1)
|
.where(loan_disbursement.docstatus == 1)
|
||||||
.where(loan_disbursement.disbursement_date >= self.from_date)
|
.where(loan_disbursement.disbursement_date >= self.from_date)
|
||||||
.where(loan_disbursement.disbursement_date <= self.to_date)
|
.where(loan_disbursement.disbursement_date <= self.to_date)
|
||||||
.where(loan_disbursement.disbursement_account.isin([self.bank_account, self.account]))
|
.where(loan_disbursement.disbursement_account == self.account)
|
||||||
.orderby(loan_disbursement.disbursement_date)
|
.orderby(loan_disbursement.disbursement_date)
|
||||||
.orderby(loan_disbursement.name, order=frappe.qb.desc)
|
.orderby(loan_disbursement.name, order=frappe.qb.desc)
|
||||||
)
|
)
|
||||||
@@ -121,7 +117,7 @@ class BankClearance(Document):
|
|||||||
.where(loan_repayment.docstatus == 1)
|
.where(loan_repayment.docstatus == 1)
|
||||||
.where(loan_repayment.posting_date >= self.from_date)
|
.where(loan_repayment.posting_date >= self.from_date)
|
||||||
.where(loan_repayment.posting_date <= self.to_date)
|
.where(loan_repayment.posting_date <= self.to_date)
|
||||||
.where(loan_repayment.payment_account.isin([self.bank_account, self.account]))
|
.where(loan_repayment.payment_account == self.account)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not self.include_reconciled_entries:
|
if not self.include_reconciled_entries:
|
||||||
|
|||||||
Reference in New Issue
Block a user