diff --git a/app/main/views/dashboard.py b/app/main/views/dashboard.py index 60c24e2f4..126b174bb 100644 --- a/app/main/views/dashboard.py +++ b/app/main/views/dashboard.py @@ -178,7 +178,10 @@ def get_dashboard_partials(service_id): } -def calculate_usage(usage, sms_free_allowance=250000, sms_rate=0.018): +def calculate_usage(usage): + # TODO: Don't hardcode these - get em from the API + sms_free_allowance = 250000 + sms_rate = 0.0165 sms_sent = usage.get('sms_count', 0) emails_sent = usage.get('email_count', 0) diff --git a/app/templates/views/pricing.html b/app/templates/views/pricing.html index 34f47e3f5..367e4687e 100644 --- a/app/templates/views/pricing.html +++ b/app/templates/views/pricing.html @@ -26,7 +26,7 @@
diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index 9280d3a60..1f97fcd50 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -34,7 +34,7 @@ {% if sms_chargeable %} {{ big_number( sms_chargeable, - 'at {:.1f}p per message'.format(sms_rate * 100), + 'at {:.2f}p per message'.format(sms_rate * 100), smaller=True ) }} {% endif %}