fix: stock balance showing incorrect value because of incorrect SLE

(cherry picked from commit 94b95d6c2f)
This commit is contained in:
Rohit Waghchaure
2026-05-19 13:23:32 +05:30
committed by Mergify
parent 3b3e33d354
commit dbacfd13b8

View File

@@ -2480,7 +2480,9 @@ def get_stock_value_difference(
)
if voucher_detail_no:
query = query.where(table.voucher_detail_no != voucher_detail_no)
query = query.where(
(table.voucher_detail_no != voucher_detail_no) | (table.voucher_detail_no.isnull())
)
elif voucher_no:
query = query.where(table.voucher_no != voucher_no)