Adds total to purchases table