I need to get total alllocated amount from payment entry for individual customer (party) into another custom doctype field what is the right way to do this?