Skip to content

Commit

Permalink
22353 correction of C, CBEN, CCC, CUL
Browse files Browse the repository at this point in the history
  • Loading branch information
vysakh-menon-aot committed Aug 26, 2024
1 parent 9128c04 commit ff3c10c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion legal-api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].27#egg=registry_schemas
git+https://github.com/bcgov/[email protected].28#egg=registry_schemas
2 changes: 1 addition & 1 deletion legal-api/requirements/bcregistry-libraries.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/bcgov/[email protected].27#egg=registry_schemas
git+https://github.com/bcgov/[email protected].28#egg=registry_schemas
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
filing your annual report.
</p>

{% if business.legalType == 'BEN' %}
{% if business.legalType in ['BEN', 'CBEN'] %}
[[whitespace-16px.html]]
<p>
In addition to filing the annual report with the Business Registry, there is a legal requirement for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
<div class="name bold">Company Name:</div>
{% 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 %}
<!-- try to get legal name from Name Request object -->
<div class="value">{{ filing.nameRequest.legalName }}</div>
Expand All @@ -36,7 +35,7 @@
{% else %}
<div class="name bold">Incorporation Number:</div>
{% endif %}
{% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'incorporationApplication'] %}
{% if filing_status == 'PAID' and filing_type in ['amalgamationApplication', 'continuationIn', 'incorporationApplication'] %}
<div class="value">Pending</div>
{% else %}
<!-- Eg, BC0878529 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff3c10c

Please sign in to comment.