Inventory Item Invoiced for Incorrect Amount

I could really use some help for a best practice here. A vendor overcharged us for an inventory item. To correct this, they issued a Credit Memo for the original (incorrect) invoice amount, and then sent a second invoice for the correct amount. What is the best way to record this Credit Memo? Would I make a "Return of Goods" entry? I tried that and the "Returned" amount was correct, but the "Inventory" amount was incorrect. I believe the system returned the item in FIFO order rather than removing the most recent goods received. The difference between the two values was charged to cost of goods sold which is incorrect. I believe I can fix the cost of goods sold issue, but I would love some advice on how to avoid this problem in the future. As always, any help is greatly appreciated!