Merge pull request #43679 from frappe/mergify/bp/version-14-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:07:17 +05:30
committed by GitHub

View File

@@ -323,9 +323,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(