push
This commit is contained in:
8
app/utils/formatters.py
Normal file
8
app/utils/formatters.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from decimal import Decimal
|
||||
|
||||
|
||||
def pln(value):
|
||||
if value is None:
|
||||
return '0,00 zł'
|
||||
quantized = Decimal(value).quantize(Decimal('0.01'))
|
||||
return f"{quantized:,.2f} zł".replace(',', 'X').replace('.', ',').replace('X', ' ')
|
||||
Reference in New Issue
Block a user