From c0683d9f538769791e3b2fd6623b9ca24a706a61 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 2 Feb 2020 10:57:14 +0530 Subject: [PATCH] Show prices to two decimal places --- datacenterlight/templatetags/custom_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/templatetags/custom_tags.py b/datacenterlight/templatetags/custom_tags.py index 4cc50caa..0574d29f 100644 --- a/datacenterlight/templatetags/custom_tags.py +++ b/datacenterlight/templatetags/custom_tags.py @@ -106,7 +106,7 @@ def get_line_item_from_stripe_invoice(invoice): period = mark_safe("%s — %s" % ( datetime.datetime.fromtimestamp(start_date).strftime('%Y-%m-%d'), datetime.datetime.fromtimestamp(end_date).strftime('%Y-%m-%d'))), - total=invoice.total/100, + total='%.2f' % (invoice.total/100), stripe_invoice_url=invoice.hosted_invoice_url, see_invoice_text=_("See Invoice") ))