How to offset AR and AP balances

We have one Vendor who is also acting as Customer. The Vendor account is V001 and the balance due to this vendor is 10,000. The Customer account is C001 and the balance due from this customer is 25000.Instead of issuing a check to vendor and then Customer issuing a check back to us, we want to net these two balances together, so after it is netted together the Vendor account of V001 will have a zero balance and the Customer account of C001 will have a balance due 15000.

Can someone helpme how to do this in AX2012?