diff --git a/queue_services/account-mailer/src/account_mailer/email_templates/payment_due_notification.html b/queue_services/account-mailer/src/account_mailer/email_templates/payment_due_notification.html index c169f42105..0c5502e5e0 100644 --- a/queue_services/account-mailer/src/account_mailer/email_templates/payment_due_notification.html +++ b/queue_services/account-mailer/src/account_mailer/email_templates/payment_due_notification.html @@ -1,12 +1,18 @@ -# Payment Due Today +# Payment Due for {{ account_number }}: {{ account_name_with_branch }} -## {{ account_number }}: {{ account_name_with_branch }} +{% if short_name_links_count > 1 %} + There's an amount owing on your account for your {{ statement_month }} statement (#{{ statement_number }}), which is due today {{ due_date }}. +{% else %} + There's an amount owing of {{ total_amount_owing }} on your account for your {{ statement_month }} statement (#{{ statement_number }}), which is due today {{ due_date }}. +{% endif %} -There's an amount owing on your recent statement due on {{ due_date }}. +{% if short_name_links_count > 1 %} + If you've made a payment recently, please verify that you've paid the full amount indicated on your statement and settle any remaining balance by {{ due_date }}. This will help ensure the smooth processing of your account and services. +{% else %} + To avoid any disruptions to your services, please make your payment as soon as possible. +{% endif %} -To avoid any disruptions to your services, please make your payment as soon as possible. - -[Log in to view your {{ statement_frequency }} statement]({{ payment_statement_url }}) +[Log in to view your {{ statement_frequency }} statements]({{ payment_statement_url }}) If you've recently made a payment, please disregard this message. diff --git a/queue_services/account-mailer/src/account_mailer/email_templates/payment_reminder_notification.html b/queue_services/account-mailer/src/account_mailer/email_templates/payment_reminder_notification.html index 7a67ebfaeb..dce986ada0 100644 --- a/queue_services/account-mailer/src/account_mailer/email_templates/payment_reminder_notification.html +++ b/queue_services/account-mailer/src/account_mailer/email_templates/payment_reminder_notification.html @@ -1,12 +1,18 @@ -# Payment Reminder +# Payment Reminder for {{ account_number }}: {{ account_name_with_branch }} -## {{ account_number }}: {{ account_name_with_branch }} +{% if short_name_links_count > 1 %} + There's an amount owing on your account for your {{ statement_month }} statement (#{{ statement_number }}). +{% else %} + There's an amount owing of {{ total_amount_owing }} on your account for your {{ statement_month }} statement (#{{ statement_number }}). +{% endif %} -There's an amount owing on your recent statement due on {{ due_date }}. +{% if short_name_links_count > 1 %} + Please settle your remaining balance before {{ due_date }}. This will help ensure the smooth processing of your account and services. +{% else %} + If you've made a payment recently, please verify that you've paid the full amount indicated on your statement and settle any remaining balance by {{ due_date }}. This will help ensure the smooth processing of your account and services. +{% endif %} -[Log in to view your {{ statement_frequency }} statement]({{ payment_statement_url }}) - -If you've recently made a payment, please disregard this message. +[Log in to view your {{ statement_frequency }} statements]({{ payment_statement_url }}) **Business Registry** BC Registries and Online Services diff --git a/queue_services/account-mailer/src/account_mailer/resources/worker.py b/queue_services/account-mailer/src/account_mailer/resources/worker.py index 3294856c64..61c532fe74 100644 --- a/queue_services/account-mailer/src/account_mailer/resources/worker.py +++ b/queue_services/account-mailer/src/account_mailer/resources/worker.py @@ -415,7 +415,10 @@ def handle_payment_reminder_or_due(message_type, email_msg): 'logo_url': logo_url, 'due_date': due_date.strftime('%B ') + format_day_with_suffix(due_date.day) + f' {due_date.year}', 'total_amount_owing': format_currency(email_msg.get('totalAmountOwing')), - 'statement_frequency': email_msg.get('statementFrequency').lower() + 'statement_frequency': email_msg.get('statementFrequency').lower(), + 'statement_month': email_msg.get('statementMonth'), + 'statement_number': email_msg.get('statementNumber'), + 'short_name_links_count': email_msg.get('shortNameLinksCount'), }) process_email(email_dict) diff --git a/queue_services/account-mailer/tests/unit/test_worker_queue.py b/queue_services/account-mailer/tests/unit/test_worker_queue.py index a61859e394..ad097ae9f2 100644 --- a/queue_services/account-mailer/tests/unit/test_worker_queue.py +++ b/queue_services/account-mailer/tests/unit/test_worker_queue.py @@ -489,7 +489,10 @@ def test_payment_reminder_notification_email(app, session, client): 'dueDate': '2023-09-15 00:00:00', 'emailAddresses': 'test@test.com', 'statementFrequency': 'MONTHLY', - 'totalAmountOwing': 351.5 + 'statementMonth': 'August', + 'statementNumber': 12345, + 'totalAmountOwing': 351.5, + 'shortNameLinksCount': 1 } helper_add_event_to_queue(client, message_type=QueueMessageTypes.PAYMENT_REMINDER_NOTIFICATION.value, @@ -513,7 +516,10 @@ def test_payment_due_notification_email(app, session, client): 'dueDate': '2023-09-15 00:00:00', 'emailAddresses': 'test@test.com', 'statementFrequency': 'MONTHLY', - 'totalAmountOwing': 351.5 + 'statementMonth': 'August', + 'statementNumber': 12345, + 'totalAmountOwing': 351.5, + 'shortNameLinksCount': 1 } helper_add_event_to_queue(client, message_type=QueueMessageTypes.PAYMENT_DUE_NOTIFICATION.value,