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:
@@ -323,9 +323,10 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
|
|
||||||
if get_opening_entries:
|
if get_opening_entries:
|
||||||
query = query.where(
|
query = query.where(
|
||||||
gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)
|
( # noqa: UP034
|
||||||
| gl_entry.is_opening
|
(gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date))
|
||||||
== "Yes"
|
| (gl_entry.is_opening == "Yes")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
query = query.where(
|
query = query.where(
|
||||||
|
|||||||
Reference in New Issue
Block a user