Пример #1
0
    def total(self):
        records = self.record_set.all()
        currency = ''
        total_amount = 0

        for record in records:
            currency = record.currency
            total_amount += record.amount
        #return '%s %s' % (currency, decimal_separator(total_amount))
        return {
            'currency': currency, 
            'amount': decimal_separator(total_amount)
        }
Пример #2
0
 def amount_format(self):
     return decimal_separator(self.amount)