1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-27 02:43:01 +00:00

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

View File

@ -7,7 +7,7 @@ from django_tables2.utils import A
from .models.notes import Alias from .models.notes import Alias
from .models.transactions import Transaction from .models.transactions import Transaction
from .templatetags.pretty_money import pretty_money
class HistoryTable(tables.Table): class HistoryTable(tables.Table):
class Meta: class Meta:
@ -28,6 +28,11 @@ class HistoryTable(tables.Table):
.order_by(('-' if is_descending else '') + 'total') .order_by(('-' if is_descending else '') + 'total')
return (queryset, True) 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 AliasTable(tables.Table):
class Meta: class Meta: