Skip to content

Commit

Permalink
Merge pull request #43602 from ljain112/fix-closing-balances
Browse files Browse the repository at this point in the history
fix: added parentheses for correct query formation for logical OR condition
  • Loading branch information
ruthra-kumar authored Oct 15, 2024
2 parents 4e8f3fe + c0da8f1 commit fc66408
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,10 @@ def get_balances_based_on_dimensions(

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(
Expand Down

0 comments on commit fc66408

Please sign in to comment.