Error while posting the Purchase Invoice in AX 2012


I have created a purchase Order, taken with the negative qty of 2. Completed the receiving of all 2. Now while posting the

Purchase Invoice, AX is giving below error.

"AX 2012<< insufficient inventory transactions with status sold. Compare purchase order and invoice values. Update

has been cancelled."

When I check the Inventory transactions for the respective Item for that PO. It is showing two lines, one with status deducted as 2

and other line with status on order quantity 2.

Please suggest some solution. If faced such kind of issue. As far as I know. If I receive all the quantity on Purchase order It should not show anything on InventTrans table as On Order or Ordered.

Note- I am using three way matching. But after removing three- way matching also getting this error.

Can you tell us what is the Reference showing beside On order? Post the screenshot if possible to understand better.