Logging payment for a purchase taken in part exchange

Hi, I create an invoice for a sale and include an item taking in part exchange to give me a total which the client pays and this tally’s with my bank statement. I then create a new purchase invoice for the item taken in part exchange, how do I allocate a payment to this purchase invoice? Cheers.