Skip to content

Commit

Permalink
fix: Opening balance in TB report (#36171)
Browse files Browse the repository at this point in the history
fix: Opening balance in TB report (#36171)

(cherry picked from commit cfae52a)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
  • Loading branch information
mergify[bot] and deepeshgarg007 committed Jul 18, 2023
1 parent a5f3984 commit 313ad7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/accounts/report/trial_balance/trial_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def get_opening_balance(
)
else:
if start_date:
opening_balance = opening_balance.where(closing_balance.posting_date >= start_date)
opening_balance = opening_balance.where(
(closing_balance.posting_date >= start_date)
& (closing_balance.posting_date < filters.from_date)
)
opening_balance = opening_balance.where(closing_balance.is_opening == "No")
else:
opening_balance = opening_balance.where(
Expand Down

0 comments on commit 313ad7a

Please sign in to comment.