The best course of action would be to enter the invoice and credit memo exactly as they appear from your vendor. If you then need to make an adjustment to the inventory value for internal purposes, you can do an item journal.
Why not just add a line for the negative quantity. Initially post the invoice, the negative line keeps the order open. Then post the negative line which corrects the stock and reflects the credit, all against the same purchase order.
No I was thinking of posting the invoice as it was issued by the vendor, then creating a credit memo as issued by the vendor (I believe you can do ‘copy doc’ and refer to the original invoice). Now your A/P is up to date as the vendor issued their documents. If you need further value adjustment of the items, you can enter an item journal to adjust cost however you see fit.