Posting vendor payment to clear payables and receivables

SOLVED

I have a vendor which we've started to do a lot of warranty service for & they've applied as credits to our account with them. Since warranty work was becoming very regular, I began to bill these jobs to separate from our purchases & requested they pay by our invoices. The vendor sent payment to clear both payables (-4000.00) & receivables (-2000.00) which also includes early payment discounts not included when clearing our account with them previously (I have already made an entry in payables to reflect the discounts). I'm still not sure that I entered the first payment correctly, but it appears ok. But now I have to clear all & I'm not sure how. I have gone as far as to create a contra account, which I applied the payables to but it didn't seem right to me, so I stopped there. I would be most grateful to anyone that can help direct me on this entry.