Can't invoice a remaining quantity of an order

I have a problem that I can’t get the remaining quantity of a purchase order, I know how it happened but I don’t know how to resolve it, I’ll show you how It happened could you please help me ?

hello, is there somebody here ?

Look at the inventory transactions. They should have been fully purchased, so you are unable to invoice for the rest.
This happens in AX (if you reduce the matched product receipt quantity while invoicing) and AX will warn you about the same.
To resolve this from purchase order, you may have to reverse the invoice posted and post it again.
For help see,…/hh454990.aspx

You say you know how it happened but dont define it, I presume this is through the incorrect processing of the previous invoice closing down the order?