Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21768 Emailer - stage 1 overdue transition notification #2867

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l
furnishing = Furnishing.find_by_id(furnishing_id)
business = furnishing.business
business_identifier = business.identifier
# get template
template = Path(
f'{current_app.config.get("TEMPLATE_PATH")}/INVOL-DIS-STAGE-1.html'
).read_text()
Expand All @@ -54,7 +55,8 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l
html_out = jnja_template.render(
business=business.json(),
entity_dashboard_url=get_entity_dashboard_url(business_identifier, token),
extra_provincials=extra_provincials
extra_provincials=extra_provincials,
furnishing_name=furnishing.furnishing_name
)
# get recipients
recipients = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,36 @@

[[20px.html]]

{% if 'NO_AR' in furnishing_name %}
<p>Your business is in the process of being dissolved because it hasn't
filed its required annual reports. Please file your overdue annual
reports as soon as possible by <a href="{{ entity_dashboard_url }}">logging into your Business Page</a>.
</p>
{% else %}
<p>Your business is in the process of being dissolved because it hasn't
filed its required Post Restoration Transition Application (PRTA).
Please file your overdue PRTA as soon as possible by <a href="{{ entity_dashboard_url }}">logging into
your Business Page</a>.
</p>
{% endif %}

[[whitespace-16px.html]]

{% if 'NO_AR' in furnishing_name %}
<p>
Under the Business Corporations Act, if you don't file these reports
within one month from today, the Registrar will post a public notice
on <a href="https://www.bclaws.gov.bc.ca/">www.bclaws.ca</a>. This notice will state that your company may be
dissolved if the annual reports aren't filed after one month.
</p>
{% else %}
<p>
Under the Business Corporations Act, if you don't file your PRTA
within one month from today, the Registrar will post a public notice
on <a href="https://www.bclaws.gov.bc.ca/">www.bclaws.ca</a>. This notice will state that your company may be
dissolved if the PRTA aren't filed after one month.
</p>
{% endif %}

[[whitespace-16px.html]]

Expand Down
17 changes: 17 additions & 0 deletions queue_services/entity-emailer/tests/unit/test_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@
}
}
}),
('f36e3af7-90c3-4859-a6f6-2feefbdc1e30',
{
'specversion': '1.x-wip',
'type': 'bc.registry.dissolution',
'source': 'furnishingsJob',
'id': 'f36e3af7-90c3-4859-a6f6-2feefbdc1e30',
'time': '',
'datacontenttype': 'application/json',
'identifier': 'BC123223',
'data': {
'furnishing': {
'type': 'INVOLUNTARY_DISSOLUTION',
'furnishingId': 1,
'furnishingName': 'DISSOLUTION_COMMENCEMENT_NO_TR'
}
}
}),
('bc.registry.affiliation_1',
{
'type': 'bc.registry.affiliation',
Expand Down
2 changes: 1 addition & 1 deletion queue_services/entity-emailer/tests/unit/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def test_send_email_with_incomplete_payload(app, session, email_msg):
])
def test_involuntary_dissolution_stage_1_notification(app, db, session, mocker, test_name,
exception, furnishing_name, expected_furnishing_status):
"""Assert that the stage 1 overdue ARs notification can be processed."""
"""Assert that the stage 1 notifications can be processed."""
business_identifier = 'BC1234567'
business = create_business(business_identifier, 'BC', 'Test Business')
furnishing = create_furnishing(session, business=business)
Expand Down
Loading