total sum of all payments in search function