From a4243372b1e62da65cea241824f989667b1c1076 Mon Sep 17 00:00:00 2001 From: Kevin Zhang <54437031+kzdev420@users.noreply.github.com> Date: Fri, 16 Aug 2024 17:27:14 -0400 Subject: [PATCH] 22494 update furnishing document style (#2913) * 22494 update furnishing document style * fix the text position * add EP case * fix lint issue * update the letter content * fix lint issue * update business legal type value * update test --- .../noticeOfDissolutionCommencement.html | 20 ++++++++++++++----- .../template-parts/common/v2/footer.html | 4 ++-- .../template-parts/common/v2/footerMail.html | 2 +- .../template-parts/common/v2/header.html | 12 ++++++----- .../template-parts/common/v2/headerMail.html | 12 ++++++----- .../template-parts/common/v2/style.html | 10 ++++++---- .../template-parts/common/v2/styleMail.html | 10 ++++++---- legal-api/src/legal_api/reports/report_v2.py | 16 +++++++++++---- legal-api/tests/unit/models/__init__.py | 4 ++-- .../tests/unit/reports/test_report_v2.py | 17 ++++++++++------ 10 files changed, 69 insertions(+), 38 deletions(-) diff --git a/legal-api/report-templates/noticeOfDissolutionCommencement.html b/legal-api/report-templates/noticeOfDissolutionCommencement.html index 197cd6cc28..166a29f7c5 100644 --- a/legal-api/report-templates/noticeOfDissolutionCommencement.html +++ b/legal-api/report-templates/noticeOfDissolutionCommencement.html @@ -32,9 +32,14 @@ {% endif %}
No Annual Reports Filed Since {{ furnishing.lastARDate }} for {{ furnishing.businessIdentifier }}
-
To file an annual report online, log in to your Business Page at business.bcregistry.gov.bc.ca/{{ furnishing.businessIdentifier }} to file any outstanding annual reports listed.
-
Under section 422 of the Business Corporation Act (the Act), this letter is to notify you that your company has for two years failed to file the annual reports required under section 51 of the Act. A company must annually, within two months after each anniversary of the date on which the company was recognized, file an annual report with the Registrar.
-
If within one month after the date of this letter, the company fails to file the outstanding annual reports, a notice may be published on the BC Laws website www.bclaws.ca. This notice will state that, at any time after the expiration of one month after the date of publication of the notice, the company will be dissolved, unless cause is shown to the contrary; I am satisfied the failure has been or is being remedied; or a copy of the entered court order to the contrary has been filed.
+
To file an annual report online, log in to your Business Page at business.bcregistry.gov.bc.ca/{{ furnishing.businessIdentifier }} to file any outstanding annual reports listed.
+ {% if furnishing.businessLegalType == 'A' %} +
Under section 422 of the Business Corporation Act (the Act), this letter is to notify you that your extraprovincial company has for two years failed to file the annual reports required under section 51 of the Act. A company must annually, within two months after each anniversary of the date on which the company was recognized, file an annual report with the Registrar.
+
If within one month after the date of this letter, the company fails to file the outstanding annual reports, a notice may be published on the BC Laws website www.bclaws.ca. This notice will state that, at any time after the expiration of one month after the date of publication of the notice, the company will be cancelled, unless cause is shown to the contrary; I am satisfied the failure has been or is being remedied; or a copy of the entered court order to the contrary has been filed.
+ {% else %} +
Under section 422 of the Business Corporation Act (the Act), this letter is to notify you that your company has for two years failed to file the annual reports required under section 51 of the Act. A company must annually, within two months after each anniversary of the date on which the company was recognized, file an annual report with the Registrar.
+
If within one month after the date of this letter, the company fails to file the outstanding annual reports, a notice may be published on the BC Laws website www.bclaws.ca. This notice will state that, at any time after the expiration of one month after the date of publication of the notice, the company will be dissolved, unless cause is shown to the contrary; I am satisfied the failure has been or is being remedied; or a copy of the entered court order to the contrary has been filed.
+ {% endif %} {% if furnishing.foreignRegistrations %}
@@ -58,8 +63,13 @@
{% endif %} -
To request a delay of the dissolution, go to business.bcregistry.gov.bc.ca/{{ furnishing.businessIdentifier }} and request for a Delay of Dissolution or Cancellation under the To Do section. This must be completed prior to the dissolution of the company.
-
If your company is dissolved under section 422(1)(a) of the Act, section 347 of the Act states the liability of each director, officer, shareholder and liquidator of a company that is dissolved continues and may be enforced as if the company had not been dissolved.
+ {% if furnishing.businessLegalType == 'A' %} +
To request a delay of the cancellation, go to business.bcregistry.gov.bc.ca/{{ furnishing.businessIdentifier }} and request for a Delay of Dissolution or Cancellation under the To Do section. This must be completed prior to the dissolution of the company.
+
If your company is cancelled under section 422(1)(a) of the Act, section 347 of the Act states the liability of each director, officer, shareholder and liquidator of a company that is cancelled continues and may be enforced as if the company had not been cancelled.
+ {% else %} +
To request a delay of the dissolution, go to business.bcregistry.gov.bc.ca/{{ furnishing.businessIdentifier }} and request for a Delay of Dissolution or Cancellation under the To Do section. This must be completed prior to the dissolution of the company.
+
If your company is dissolved under section 422(1)(a) of the Act, section 347 of the Act states the liability of each director, officer, shareholder and liquidator of a company that is dissolved continues and may be enforced as if the company had not been dissolved.
+ {% endif %}
If you have filed the outstanding annual reports, no further action is required.
If you need help with setting up an account or managing a business, please visit our Resources and Help page at bcreg.ca/resources
diff --git a/legal-api/report-templates/template-parts/common/v2/footer.html b/legal-api/report-templates/template-parts/common/v2/footer.html index 327baf5792..e3b91bc781 100644 --- a/legal-api/report-templates/template-parts/common/v2/footer.html +++ b/legal-api/report-templates/template-parts/common/v2/footer.html @@ -9,7 +9,7 @@ .footer { width: 97%; margin-top: 0px !important; - padding-top: 0px; + padding: 0px 20rem; } .footer-table { @@ -31,7 +31,7 @@ .footer-text { font-family: 'BC Sans' !important; - color: #003366 !important; + color: #234075 !important; font-size: 8px; /* 10 */ text-align: right; } diff --git a/legal-api/report-templates/template-parts/common/v2/footerMail.html b/legal-api/report-templates/template-parts/common/v2/footerMail.html index 10bb2c1869..5018a02f11 100644 --- a/legal-api/report-templates/template-parts/common/v2/footerMail.html +++ b/legal-api/report-templates/template-parts/common/v2/footerMail.html @@ -9,7 +9,7 @@ .footer { width: 97%; margin-top: 0px !important; - padding-top: 0px; + padding: 0px 20rem; } .footer-table { diff --git a/legal-api/report-templates/template-parts/common/v2/header.html b/legal-api/report-templates/template-parts/common/v2/header.html index 52e8b1a6ca..62b7ca7623 100644 --- a/legal-api/report-templates/template-parts/common/v2/header.html +++ b/legal-api/report-templates/template-parts/common/v2/header.html @@ -17,8 +17,10 @@ width: 100%; margin-right: 3rem !important; margin-left: 3rem; - margin-top: 0 !important; + margin-top: 3px !important; margin-bottom: 0 !important; + padding-left: 17rem; + padding-right: 15rem; } .header-table tr { margin-top: 0px !important; @@ -39,14 +41,14 @@ .header-table td:nth-child(2) { width: 75%; padding-right: 4px; - padding-top: 16px; /* 24 */ + padding-top: 30px; /* 24 */ } .separator { border-bottom: 2px solid #234075; width: 94%; margin-left: 34px !important; - margin-top: 7px !important; /* 16 */ + margin-top: 12px !important; /* 16 */ margin-right: 0px !important; margin-bottom: 0 !important; /* 0 */ } @@ -54,7 +56,7 @@ .report-type { font-family: 'BC Sans' !important; color: #234075; - font-size: 12pt !important; + font-size: 11pt !important; font-weight: bold; text-align: right; } @@ -62,7 +64,7 @@ .report-type-desc { font-family: 'BC Sans' !important; color: #1A5A96; - font-size: 9pt !important; + font-size: 8pt !important; text-align: right; } diff --git a/legal-api/report-templates/template-parts/common/v2/headerMail.html b/legal-api/report-templates/template-parts/common/v2/headerMail.html index b7a740aaee..0247125bfa 100644 --- a/legal-api/report-templates/template-parts/common/v2/headerMail.html +++ b/legal-api/report-templates/template-parts/common/v2/headerMail.html @@ -17,8 +17,10 @@ width: 100%; margin-right: 3rem !important; margin-left: 3rem; - margin-top: 0 !important; + margin-top: 3px !important; margin-bottom: 0 !important; + padding-left: 17rem; + padding-right: 15rem; } .header-table tr { margin-top: 0px !important; @@ -39,14 +41,14 @@ .header-table td:nth-child(2) { width: 75%; padding-right: 4px; - padding-top: 16px; /* 24 */ + padding-top: 30px; /* 24 */ } .separator { border-bottom: 2px solid #000000; width: 94%; margin-left: 34px !important; - margin-top: 7px !important; /* 16 */ + margin-top: 12px !important; /* 16 */ margin-right: 0px !important; margin-bottom: 0 !important; /* 0 */ } @@ -54,7 +56,7 @@ .report-type { font-family: 'Calibri' !important; color: #000000; - font-size: 12pt !important; + font-size: 11pt !important; font-weight: bold; text-align: right; } @@ -62,7 +64,7 @@ .report-type-desc { font-family: 'Calibri' !important; color: #000000; - font-size: 9pt !important; + font-size: 8pt !important; text-align: right; } diff --git a/legal-api/report-templates/template-parts/common/v2/style.html b/legal-api/report-templates/template-parts/common/v2/style.html index c8a13f8a97..8792ccb86b 100644 --- a/legal-api/report-templates/template-parts/common/v2/style.html +++ b/legal-api/report-templates/template-parts/common/v2/style.html @@ -98,9 +98,11 @@ color: #313132; font-family: 'BCSans-Regular', sans-serif !important; font-size: 14.66px; /*approx 11px after render*/ - line-height: 20px; /*approx 15px after render */ + line-height: 19.72px; /*approx 15px after render */ /* margin-top: 60px; */ text-align: left; + padding-left: 0.5rem; + padding-right: 1.2rem; } .section-title { @@ -586,7 +588,7 @@ } .address-container-additional-info { - margin-top: 3.25rem !important; + margin-top: 3.3rem !important; } .address-container-no-additional-info { @@ -594,10 +596,10 @@ } .address-container { - margin-top: -3.25rem; + margin-top: -3.2rem; } .letter-container { - margin-top: 5.5rem; + margin-top: 4.75rem; } diff --git a/legal-api/report-templates/template-parts/common/v2/styleMail.html b/legal-api/report-templates/template-parts/common/v2/styleMail.html index 260a93b039..de0f0445d1 100644 --- a/legal-api/report-templates/template-parts/common/v2/styleMail.html +++ b/legal-api/report-templates/template-parts/common/v2/styleMail.html @@ -106,9 +106,11 @@ /* font-family: 'BCSans-Regular', sans-serif !important; */ font-family: 'Calibri'!important; font-size: 14.66px; /*approx 11px after render*/ - line-height: 20px; /*approx 15px after render */ + line-height: 19.72px; /*approx 15px after render */ /* margin-top: 60px; */ text-align: left; + padding-left: 0.5rem; + padding-right: 1.2rem; } .section-title { @@ -618,7 +620,7 @@ } .address-container-additional-info { - margin-top: 3.25rem !important; + margin-top: 3.3rem !important; } .address-container-no-additional-info { @@ -626,10 +628,10 @@ } .address-container { - margin-top: -3.25rem; + margin-top: -3.2rem; } .letter-container { - margin-top: 5.5rem; + margin-top: 4.75rem; } diff --git a/legal-api/src/legal_api/reports/report_v2.py b/legal-api/src/legal_api/reports/report_v2.py index 1f13742861..df2e5d006c 100644 --- a/legal-api/src/legal_api/reports/report_v2.py +++ b/legal-api/src/legal_api/reports/report_v2.py @@ -22,7 +22,7 @@ from flask import current_app, jsonify from jinja2 import Template -from legal_api.models import Address +from legal_api.models import Address, Business from legal_api.reports.registrar_meta import RegistrarInfo from legal_api.services import MrasService from legal_api.utils.base import BaseEnum @@ -133,7 +133,8 @@ def _get_template_data(self): def _format_furnishing_data(self): self._report_data['furnishing'] = { 'businessName': self._furnishing.business_name, - 'businessIdentifier': self._furnishing.business_identifier + 'businessIdentifier': self._furnishing.business_identifier, + 'businessLegalType': self._business.legal_type } if self._furnishing.last_ar_date: @@ -153,7 +154,14 @@ def _set_meta_info(self): self._report_data['variant'] = self._variant else: self._report_data['variant'] = 'default' - self._report_data['title'] = ReportMeta.reports[self._document_key]['reportDescription'].upper() + + title = ReportMeta.reports[self._document_key]['reportDescription'] + if self._document_key == ReportTypes.DISSOLUTION: + if self._business.legal_type in [Business.LegalTypes.EXTRA_PRO_A.value]: + title = title.replace('{{REPORT_TYPE}}', 'CANCELLATION') + else: + title = title.replace('{{REPORT_TYPE}}', 'DISSOLUTION') + self._report_data['title'] = title.upper() def _set_address(self): if (furnishing_address := Address.find_by(furnishings_id=self._furnishing.id)): @@ -244,6 +252,6 @@ class ReportMeta: ReportTypes.DISSOLUTION: { 'reportName': 'dissoluion', 'templateName': 'noticeOfDissolutionCommencement', - 'reportDescription': 'Notice of Commencement of Dissolution' + 'reportDescription': 'Notice of Commencement of {{REPORT_TYPE}}' } } diff --git a/legal-api/tests/unit/models/__init__.py b/legal-api/tests/unit/models/__init__.py index 3e84c5f313..17fdce1208 100644 --- a/legal-api/tests/unit/models/__init__.py +++ b/legal-api/tests/unit/models/__init__.py @@ -459,9 +459,9 @@ def factory_furnishing(business_id, return furnishing -def factory_business_with_stage_one_furnishing(): +def factory_business_with_stage_one_furnishing(legal_type=None): """Create a business with a stage one furnishing entry.""" - business = factory_business('BC1234567') + business = factory_business(identifier='BC1234567', entity_type=legal_type) factory_business_mailing_address(business) batch = factory_batch() furnishing = factory_furnishing(business_id=business.id, diff --git a/legal-api/tests/unit/reports/test_report_v2.py b/legal-api/tests/unit/reports/test_report_v2.py index 8209ca9919..e7bf48427c 100644 --- a/legal-api/tests/unit/reports/test_report_v2.py +++ b/legal-api/tests/unit/reports/test_report_v2.py @@ -21,14 +21,16 @@ @pytest.mark.parametrize( - 'test_name, variant', [ - ('COMMENCEMENT_DEFAULT', 'default'), - ('COMMENCEMENT_GREYSCALE', 'greyscale'), + 'test_name, variant, legal_type', [ + ('COMMENCEMENT_DEFAULT_DISSOLUTION', 'default', 'BEN'), + ('COMMENCEMENT_GREYSCALE_DISSOLUTION', 'greyscale', 'BC'), + ('COMMENCEMENT_DEFAULT_CANCELLATION', 'default', 'A'), + ('COMMENCEMENT_GREYSCALE_CANCELLATION', 'greyscale', 'A'), ] ) -def test_get_pdf(session, test_name, variant): +def test_get_pdf(session, test_name, variant, legal_type): """Assert that furnishing can be returned as a Gotenberg PDF.""" - business, furnishing = factory_business_with_stage_one_furnishing() + business, furnishing = factory_business_with_stage_one_furnishing(legal_type=legal_type) with patch.object(MrasService, 'get_jurisdictions', return_value=[]): report = ReportV2(business, furnishing, ReportTypes.DISSOLUTION, variant) filename = report._get_report_filename() @@ -40,7 +42,10 @@ def test_get_pdf(session, test_name, variant): assert template_data['furnishing'] assert template_data['variant'] == variant assert template_data['registrarInfo'] - assert template_data['title'] == 'NOTICE OF COMMENCEMENT OF DISSOLUTION' + if legal_type == 'A': + assert template_data['title'] == 'NOTICE OF COMMENCEMENT OF CANCELLATION' + else: + assert template_data['title'] == 'NOTICE OF COMMENCEMENT OF DISSOLUTION' report_files = report._get_report_files(template_data) assert report_files assert 'header.html' in report_files