From 15ef20dbc10c6187cc1af7bde4c99e3203ff0306 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 15 Nov 2019 22:58:47 +0530 Subject: [PATCH] Fix yearly email --- datacenterlight/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index af6627ec..44226abb 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -994,6 +994,9 @@ class OrderConfirmationView(DetailView, FormView): 'reply_to': [context['email']], } send_plain_email_task.delay(email_data) + recurring_text = _(" This is a monthly recurring plan.") + if gp_details['recurring_interval'] == "year": + recurring_text = _(" This is an yearly recurring plan.") email_data = { 'subject': _("Confirmation of your payment"), @@ -1007,7 +1010,7 @@ class OrderConfirmationView(DetailView, FormView): name=user.get('name'), amount=gp_details['amount'], recurring=( - _(' This is a monthly recurring plan.') + recurring_text if gp_details['recurring'] else '' ) )