I am buying one good from a vendor at the same time I am selling something to him.
How can i create a single enity for him?
can i settle up the purchase and sales bill?
You need to create two separate entities. However you can compensate between the two whenever you want through journal entries.