Inventory value of finished goods is getting wrong

Please read post by @Lubos above your and click on the link Added inventory cost correction workflow