Applying a vendor credit memo to an A/R invoice (credit memo is payment for the A/R invoice)

I work for a company that purchases fireplaces and installs them amongst other things.  There were faulty parts in a fireplace we installed so we switched the defective part with a new one, returned the defective part to the vendor and invoiced the vendor for our labour.  So this vendor is also now a customer.

Instead of issuing us a cheque for the labour we invoiced them for they chose to create a credit memo.   We pay them once per month after we receive the statement so the upcoming statement will have invoices we owe them for as well as that credit memo.

Not sure if it matters but I am using Sage 50 Pro.

For some reason I just cannot wrap my head around how to go about posting this.