fix: Opening balance in TB report (#36171)

fix: Opening balance in TB report (#36171)

(cherry picked from commit cfae52a40a)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-07-18 14:20:28 +05:30
committed by GitHub
parent a5f398474a
commit 313ad7ae89

View File

@@ -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(