mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #30237 from frappe/mergify/bp/version-13-hotfix/pr-30207
fix: Do not consider cancelled entries (backport #30207)
This commit is contained in:
@@ -107,6 +107,7 @@ def get_opening_balances(filters):
|
|||||||
select party, sum(debit) as opening_debit, sum(credit) as opening_credit
|
select party, sum(debit) as opening_debit, sum(credit) as opening_credit
|
||||||
from `tabGL Entry`
|
from `tabGL Entry`
|
||||||
where company=%(company)s
|
where company=%(company)s
|
||||||
|
and is_cancelled=0
|
||||||
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''
|
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''
|
||||||
and (posting_date < %(from_date)s or ifnull(is_opening, 'No') = 'Yes')
|
and (posting_date < %(from_date)s or ifnull(is_opening, 'No') = 'Yes')
|
||||||
{account_filter}
|
{account_filter}
|
||||||
@@ -133,6 +134,7 @@ def get_balances_within_period(filters):
|
|||||||
select party, sum(debit) as debit, sum(credit) as credit
|
select party, sum(debit) as debit, sum(credit) as credit
|
||||||
from `tabGL Entry`
|
from `tabGL Entry`
|
||||||
where company=%(company)s
|
where company=%(company)s
|
||||||
|
and is_cancelled = 0
|
||||||
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''
|
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''
|
||||||
and posting_date >= %(from_date)s and posting_date <= %(to_date)s
|
and posting_date >= %(from_date)s and posting_date <= %(to_date)s
|
||||||
and ifnull(is_opening, 'No') = 'No'
|
and ifnull(is_opening, 'No') = 'No'
|
||||||
|
|||||||
Reference in New Issue
Block a user