Link the vendor and customer accounts following my answer in this post:
Manually how to make payment to vendor who is also my customer.
Create Sales orders and purchase orders for the customer and vendor respectively and follow the regular MM/ SD cycles.
As your total sales = total purchases, you should always have net zero payable/receivable from that party in F110.