Stock has value but zero or blank quantity

I have experienced the same issue, and after very detail research i have found the marking is missing from many items

The reason when you run the Inventory closing or inventory recalculation , the cost of the item couldnt fix properly.

Solution :

You have to go to Inventory management → Inquiry → Transactions

Lot ID and Reference lot ID must be fill in for all items which are come from Production ( or you can use ‘Production’ in reference )

all the missing Reference lot ID items , you need to go back on these production orders and mark automatically, then run the recalculation , the item cost will fix properly inshAllah.