Contra Account

I apologize if this has already been responded to but I can't find the answer in the forums.  I have a customer who purchased some equipment from our company.  This customer is also a supplier of goods to our business.  Instead of the customer issuing a cheque to pay for the equipment, he issued a credit invoice.  We have purchased goods from this supplier that resulted in them sending us invoices.  I want to apply the invoices owing to the supplier to the credit we have with the supplier.  How do I do this?