How to get customers total unpaid

Hello community . is there a way to get this field as a variable (for a print format) ? because the doctype doesn’t have a field named total unpaid .

You can use this method in Jinja to get the balance of the party at time of printing

That is exactly what I did