Merge branch 'master' of gitlab.crans.org:bde/nk20
This commit is contained in:
commit
f13ccf11aa
3 changed files with 12 additions and 13 deletions
|
|
@ -3,9 +3,9 @@ from django import template
|
|||
|
||||
def pretty_money(value):
|
||||
if value%100 == 0:
|
||||
return str(value//100) + '€'
|
||||
return "{:s}{:d} €".format("- " if value < 0 else "", abs(value) // 100)
|
||||
else:
|
||||
return str(value//100) + '€ ' + str(value%100)
|
||||
return "{:s}{:d} € {:02d}".format("- " if value < 0 else "", abs(value) // 100, abs(value) % 100)
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue