A/P Discount After Invoice

Some of our vendors issue discount checks after we have received, recorded (and in some cases paid) the invoices that they are discounting. 

What is the best way for me to:

1) Receive the check against the vendor's account (rather than customer)

2) Pass the discount onto inventory's average cost without affecting the inventory quantity