Esempio n. 1
0
 def to_representation(self, obj):
     ret = super(TransactionSerializer, self).to_representation(obj)
     ret.update({
         'description': as_html_description(obj),
         'is_debit': self._is_debit(obj),
         'amount': as_money(obj.dest_amount, '-%s' % obj.dest_unit
                     if self._is_debit(obj) else obj.dest_unit)})
     return ret
Esempio n. 2
0
 def to_representation(self, obj):
     ret = super(TransactionSerializer, self).to_representation(obj)
     is_debit = self._is_debit(obj)
     if is_debit:
         amount = as_money(obj.orig_amount, '-%s' % obj.orig_unit)
     else:
         amount = as_money(obj.dest_amount, obj.dest_unit)
     ret.update({
         'description': as_html_description(obj),
         'is_debit': is_debit,
         'amount': amount})
     return ret
Esempio n. 3
0
 def to_representation(self, obj):
     ret = super(TransactionSerializer, self).to_representation(obj)
     ret.update({
         'description':
         as_html_description(obj),
         'is_debit':
         self._is_debit(obj),
         'amount':
         as_money(
             obj.dest_amount, '-%s' %
             obj.dest_unit if self._is_debit(obj) else obj.dest_unit)
     })
     return ret
Esempio n. 4
0
 def to_representation(self, obj):
     ret = super(TransactionSerializer, self).to_representation(obj)
     is_debit = self._is_debit(obj)
     if is_debit:
         amount = as_money(obj.orig_amount, '-%s' % obj.orig_unit)
     else:
         amount = as_money(obj.dest_amount, obj.dest_unit)
     ret.update({
         'description':
         as_html_description(obj, provider=get_current_provider()),
         'is_debit':
         is_debit,
         'amount':
         amount
     })
     return ret
Esempio n. 5
0
def describe(transaction):
    return mark_safe(as_html_description(transaction))
Esempio n. 6
0
def describe(transaction):
    return mark_safe(as_html_description(transaction))
Esempio n. 7
0
def describe(transaction):
    return mark_safe(as_html_description(
        transaction, provider=get_current_provider()))
Esempio n. 8
0
def describe(transaction):
    return mark_safe(as_html_description(
        transaction, provider=get_current_provider()))