pretty print in transaction tables

This commit is contained in:
Pierre-antoine Comby 2020-03-09 18:53:13 +01:00
parent e1063fcaa2
commit 526744052e
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@ from django_tables2.utils import A
from .models.notes import Alias
from .models.transactions import Transaction
from .templatetags.pretty_money import pretty_money
class HistoryTable(tables.Table):
class Meta:
@ -28,6 +28,11 @@ class HistoryTable(tables.Table):
.order_by(('-' if is_descending else '') + 'total')
return (queryset, True)
def render_amount(self,value):
return pretty_money(value)
def render_total(self,value):
return pretty_money(value)
class AliasTable(tables.Table):
class Meta: