Hi, I have made a custom app please have a look and comment
Double Ledger Management
App to accommodate parties that act as both customers and suppliers in ERPNEXT
Many times we see that a we buy from the same customer we sell our products to and vice versa. In that case it becomes tedious to operate two different ledgers and put adjustment entries manually. Adding manual entries leads to human error. This app will will take care of such accounts.