Stock Ledger Entry Stock Queue is []

Even though the stock doctype has value difference there are Stock Ledger Entries with Stock Queue empty and it is unable to valuate stock correctly.
Anyone has any ideas?

Thank you.