mirror of https://gitlab.crans.org/bde/nk20
pretty print in transaction tables
This commit is contained in:
parent
e1063fcaa2
commit
526744052e
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue