Merge pull request #43680 from frappe/mergify/bp/version-15-hotfix/pr-43602

fix: added parentheses for correct query formation for logical OR condition (backport #43602)
This commit is contained in:
ruthra kumar
2024-10-15 17:03:22 +05:30
committed by GitHub

View File

@@ -353,9 +353,10 @@ class PeriodClosingVoucher(AccountsController):
if get_opening_entries:
query = query.where(
gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)
| gl_entry.is_opening
== "Yes"
( # noqa: UP034
(gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date))
| (gl_entry.is_opening == "Yes")
)
)
else:
query = query.where(