How to fetch total unpaid balance of customer to sale inovoice

This will Help.