Adds #total method to .purchases relationship.