From ff3c10cc1b13a24dc9c7c064d94066cfdf852274 Mon Sep 17 00:00:00 2001 From: "vysakh.menon" Date: Mon, 26 Aug 2024 09:17:23 -0700 Subject: [PATCH] 22353 correction of C, CBEN, CCC, CUL --- legal-api/requirements.txt | 2 +- legal-api/requirements/bcregistry-libraries.txt | 2 +- .../legal_api/services/filings/validations/correction.py | 4 +--- .../filings/validations/incorporation_application.py | 6 +++++- .../email_processors/correction_notification.py | 6 +++--- .../src/entity_emailer/email_templates/AR-REMINDER.html | 2 +- .../email_templates/common/business-information.html | 5 ++--- .../src/entity_filer/filing_processors/correction.py | 4 +--- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/legal-api/requirements.txt b/legal-api/requirements.txt index 343b9ccadd..edf4fed385 100755 --- a/legal-api/requirements.txt +++ b/legal-api/requirements.txt @@ -59,4 +59,4 @@ PyPDF2==1.26.0 reportlab==3.6.12 html-sanitizer==2.4.1 lxml==5.2.2 -git+https://github.com/bcgov/business-schemas.git@2.18.27#egg=registry_schemas +git+https://github.com/bcgov/business-schemas.git@2.18.28#egg=registry_schemas diff --git a/legal-api/requirements/bcregistry-libraries.txt b/legal-api/requirements/bcregistry-libraries.txt index 03e2825671..73bed83bed 100644 --- a/legal-api/requirements/bcregistry-libraries.txt +++ b/legal-api/requirements/bcregistry-libraries.txt @@ -1 +1 @@ -git+https://github.com/bcgov/business-schemas.git@2.18.27#egg=registry_schemas +git+https://github.com/bcgov/business-schemas.git@2.18.28#egg=registry_schemas diff --git a/legal-api/src/legal_api/services/filings/validations/correction.py b/legal-api/src/legal_api/services/filings/validations/correction.py index c1fe798a84..7eed2a0e7a 100644 --- a/legal-api/src/legal_api/services/filings/validations/correction.py +++ b/legal-api/src/legal_api/services/filings/validations/correction.py @@ -68,9 +68,7 @@ def validate(business: Business, filing: Dict) -> Error: if legal_type := filing.get('filing', {}).get('business', {}).get('legalType'): if legal_type in [Business.LegalTypes.SOLE_PROP.value, Business.LegalTypes.PARTNERSHIP.value]: _validate_firms_correction(business, filing, legal_type, msg) - elif legal_type in [Business.LegalTypes.COMP.value, Business.LegalTypes.BCOMP.value, - Business.LegalTypes.BC_ULC_COMPANY.value, - Business.LegalTypes.BC_CCC.value]: + elif legal_type in Business.CORPS: _validate_corps_correction(filing, legal_type, msg) elif legal_type in [Business.LegalTypes.COOP.value]: _validate_special_resolution_correction(filing, legal_type, msg) diff --git a/legal-api/src/legal_api/services/filings/validations/incorporation_application.py b/legal-api/src/legal_api/services/filings/validations/incorporation_application.py index 31525b46de..dc33ed88eb 100644 --- a/legal-api/src/legal_api/services/filings/validations/incorporation_application.py +++ b/legal-api/src/legal_api/services/filings/validations/incorporation_application.py @@ -133,7 +133,11 @@ def validate_roles(filing_dict: dict, legal_type: str, filing_type: str = 'incor Business.LegalTypes.BCOMP.value: 1, Business.LegalTypes.COMP.value: 1, Business.LegalTypes.BC_ULC_COMPANY.value: 1, - Business.LegalTypes.BC_CCC.value: 3 + Business.LegalTypes.BC_CCC.value: 3, + Business.LegalTypes.BCOMP_CONTINUE_IN.value: 1, + Business.LegalTypes.CONTINUE_IN.value: 1, + Business.LegalTypes.ULC_CONTINUE_IN.value: 1, + Business.LegalTypes.CCC_CONTINUE_IN.value: 3 } parties_array = filing_dict['filing'][filing_type]['parties'] msg = [] diff --git a/queue_services/entity-emailer/src/entity_emailer/email_processors/correction_notification.py b/queue_services/entity-emailer/src/entity_emailer/email_processors/correction_notification.py index 502217c122..48183b5267 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_processors/correction_notification.py +++ b/queue_services/entity-emailer/src/entity_emailer/email_processors/correction_notification.py @@ -25,7 +25,7 @@ from flask import current_app from jinja2 import Template from legal_api.core.filing_helper import is_special_resolution_correction_by_filing_json -from legal_api.models import Filing +from legal_api.models import Business, Filing from entity_emailer.email_processors import get_filing_document, get_filing_info, substitute_template_parts from entity_emailer.email_processors.special_resolution_helper import get_completed_pdfs @@ -107,7 +107,7 @@ def _get_pdfs( } ) attach_order += 1 - elif legal_type in ('BC', 'BEN', 'CC', 'ULC'): + elif legal_type in Business.CORPS: # add notice of articles noa_pdf_type = 'noticeOfArticles' noa_encoded = get_filing_document(business['identifier'], filing.id, noa_pdf_type, token) @@ -206,7 +206,7 @@ def process(email_info: dict, token: str) -> Optional[dict]: # pylint: disable= if legal_type in ['SP', 'GP']: prefix = 'FIRM' - elif legal_type in ['BC', 'BEN', 'CC', 'ULC']: + elif legal_type in Business.CORPS: original_filing_type = filing.filing_json['filing']['correction']['correctedFilingType'] if original_filing_type in ['annualReport', 'changeOfAddress', 'changeOfDirectors']: return None diff --git a/queue_services/entity-emailer/src/entity_emailer/email_templates/AR-REMINDER.html b/queue_services/entity-emailer/src/entity_emailer/email_templates/AR-REMINDER.html index 4ca10f718d..9c306903b0 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_templates/AR-REMINDER.html +++ b/queue_services/entity-emailer/src/entity_emailer/email_templates/AR-REMINDER.html @@ -60,7 +60,7 @@ filing your annual report.

- {% if business.legalType == 'BEN' %} + {% if business.legalType in ['BEN', 'CBEN'] %} [[whitespace-16px.html]]

In addition to filing the annual report with the Business Registry, there is a legal requirement for diff --git a/queue_services/entity-emailer/src/entity_emailer/email_templates/common/business-information.html b/queue_services/entity-emailer/src/entity_emailer/email_templates/common/business-information.html index d91084a0fc..0efc0e61c7 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_templates/common/business-information.html +++ b/queue_services/entity-emailer/src/entity_emailer/email_templates/common/business-information.html @@ -11,8 +11,7 @@

Company Name:
{% endif %} - {% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'incorporationApplication', - 'continuationIn'] %} + {% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'continuationIn', 'incorporationApplication'] %} {% if filing.nameRequest.legalName %}
{{ filing.nameRequest.legalName }}
@@ -36,7 +35,7 @@ {% else %}
Incorporation Number:
{% endif %} - {% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'incorporationApplication'] %} + {% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'continuationIn', 'incorporationApplication'] %}
Pending
{% else %} diff --git a/queue_services/entity-filer/src/entity_filer/filing_processors/correction.py b/queue_services/entity-filer/src/entity_filer/filing_processors/correction.py index 68b2a52c9b..09359435ab 100644 --- a/queue_services/entity-filer/src/entity_filer/filing_processors/correction.py +++ b/queue_services/entity-filer/src/entity_filer/filing_processors/correction.py @@ -47,9 +47,7 @@ def process(correction_filing: Filing, filing: Dict, filing_meta: FilingMeta, bu ) corrected_filing_type = filing['correction']['correctedFilingType'] - # added CP, change of directors / change of address for CP is allowed - if business.legal_type in ['SP', 'GP', 'BC', 'BEN', 'CC', 'ULC', 'CP'] and \ - corrected_filing_type != 'conversion': + if corrected_filing_type != 'conversion': correct_business_data(business, correction_filing, filing, filing_meta) else: # set correction filing to PENDING_CORRECTION, for manual intervention