record an item return on a sales order

We have customers that buy a new piece of equipment and trade-in an old one at the same time.

How would we record the trade-in on the sale?  Do we put a negative amount in the quantity field?  This appears to use the wrong cost for the returned item.

We can break this into 2 transactions - a purchase of the used equipment and then a sale of the new.  The customer would also need to be a vendor.

Any other ideas?