Hi,
the new condition that you added doesn't change anything, since the InventTransOrigin always has the same item id than InventTrans.
I don't see the ReferenceCategory in your report so I can't evaluate whether the data is correct or not.
By looking at the report and the code, I think that your issue is somewhere else than in the code that we are looking at.
Otherwise we would not see different values in ClosingConsignmentStockQty and ClosingStockQty on those report rows.
Please do following steps:
1) Debug your code to see what it does
2) Check the data in your table
3) Verify that the report shows the table data correctly