def total_tax(self):
        """Returns the sum of all Tax objects."""
        q = Tax.objects.filter(receipt=self).aggregate(total=Sum('amount'))
        return q['total'] or 0
Returns the sum of all Tax objects.