mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
Merge pull request #23205 from mujeerhashmi/fix_customer_ledger_summary
fix: Filter out cancelled entries in customer ledger summary
This commit is contained in:
@@ -173,7 +173,7 @@ class PartyLedgerSummaryReport(object):
|
|||||||
from `tabGL Entry` gle
|
from `tabGL Entry` gle
|
||||||
{join}
|
{join}
|
||||||
where
|
where
|
||||||
gle.docstatus < 2 and gle.party_type=%(party_type)s and ifnull(gle.party, '') != ''
|
gle.docstatus < 2 and gle.is_cancelled = 0 and gle.party_type=%(party_type)s and ifnull(gle.party, '') != ''
|
||||||
and gle.posting_date <= %(to_date)s {conditions}
|
and gle.posting_date <= %(to_date)s {conditions}
|
||||||
order by gle.posting_date
|
order by gle.posting_date
|
||||||
""".format(join=join, join_field=join_field, conditions=conditions), self.filters, as_dict=True)
|
""".format(join=join, join_field=join_field, conditions=conditions), self.filters, as_dict=True)
|
||||||
@@ -248,7 +248,7 @@ class PartyLedgerSummaryReport(object):
|
|||||||
from
|
from
|
||||||
`tabGL Entry`
|
`tabGL Entry`
|
||||||
where
|
where
|
||||||
docstatus < 2
|
docstatus < 2 and is_cancelled = 0
|
||||||
and (voucher_type, voucher_no) in (
|
and (voucher_type, voucher_no) in (
|
||||||
select voucher_type, voucher_no from `tabGL Entry` gle, `tabAccount` acc
|
select voucher_type, voucher_no from `tabGL Entry` gle, `tabAccount` acc
|
||||||
where acc.name = gle.account and acc.account_type = '{income_or_expense}'
|
where acc.name = gle.account and acc.account_type = '{income_or_expense}'
|
||||||
|
|||||||
Reference in New Issue
Block a user