Input purchase invoices to fwd balances of unpaid inv

As per instructions, i input all unpaid purchase invoices to fwd balances of a/c payable. But it creates an issues in inventory. Goods has been sold already in last term but showing in stock.

Pls advice how to rectify