Skip to content
Closed
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
2 changes: 1 addition & 1 deletion legal-api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "legal-api"
version = "3.1.19"
version = "3.1.20"
description = ""
authors = [
{name = "thor",email = "1042854+thorwolpert@users.noreply.github.com"}
Expand Down
40 changes: 40 additions & 0 deletions legal-api/report-templates/consentContinuationOut.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,45 @@
<div class="section-data pt-2">{{ jurisdiction }}</div>
</div>
</div>

<div class="container pt-4">
<div class="no-page-break">
<div class="section-title mt-4">Completing Party Confirmation</div>
<div class="section-data mt-4">
I, {{ header.certifiedBy }}, the completing party, confirm that the laws of the foreign jurisdiction
to which the continued corporation will be subject provide, in effect, for the following:
<ul class="mt-2">
<li>the property, rights and interest of the company continue to be the property, rights and
interests of the continued corporation,</li>
<li>the continued corporation continues to be liable for the obligations of the company,</li>
<li>an existing cause of action, claim or liability to prosecution is unaffected,</li>
<li>a legal proceeding being prosecuted or pending by or against the company may be prosecuted
or its prosecution may be continued, as the case may be, by or against the continued
corporation, and</li>
<li>a conviction against, or a ruling, or judgment in favour of or against, the company may be
enforced by or against the continued corporation.</li>
</ul>
</div>
</div>
</div>

<div class="container pt-4">
<div class="no-page-break">
<div class="separator mt-4"></div>
<div class="section-title mt-4">Certification</div>
<div class="section-data mt-4">
I certify that the information provided is correct and that I am authorized to submit this
filing on behalf of the {{ entityDescription }}.
</div>
<div class="section-data mt-4">
<strong>Date:</strong> {{ header.date }}
</div>
<div class="section-data mt-4">
<strong>Note:</strong> It is an offence to make a false or misleading statement in respect of
a material fact in a record submitted to the Corporate Registry for filing. See section 427
of the <em>Business Corporations Act</em>.
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
CoreFiling.FilingTypes.CHANGEOFADDRESS,
CoreFiling.FilingTypes.CHANGEOFDIRECTORS,
CoreFiling.FilingTypes.CHANGEOFREGISTRATION,
CoreFiling.FilingTypes.CONSENTCONTINUATIONOUT,
CoreFiling.FilingTypes.NOTICEOFWITHDRAWAL,
CoreFiling.FilingTypes.REGISTRATION,
CoreFiling.FilingTypes.SPECIALRESOLUTION,
Expand All @@ -97,7 +98,6 @@
CoreFiling.FilingTypes.CHANGEOFADDRESS,
CoreFiling.FilingTypes.CHANGEOFDIRECTORS,
CoreFiling.FilingTypes.CONSENTAMALGAMATIONOUT,
CoreFiling.FilingTypes.CONSENTCONTINUATIONOUT,
CoreFiling.FilingTypes.CONTINUATIONIN,
CoreFiling.FilingTypes.CONTINUATIONOUT,
CoreFiling.FilingTypes.CORRECTION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def validate(business: Business, filing: dict) -> Error | None:
msg.extend([{"error": "Can't have new consent for same jurisdiction if an unexpired one already exists",
"path": foreign_jurisdiction_path}])

if not filing["filing"][filing_type].get("confirmCompletionParty"):
msg.append({
"error": babel("Confirm Completion is required."),
"path": f"/filing/{filing_type}/confirmCompletionParty"
})

if court_order := filing.get("filing", {}).get(filing_type, {}).get("courtOrder", None):
court_order_path: Final = f"/filing/{filing_type}/courtOrder"
msg.extend(validate_court_order(court_order_path, court_order))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,47 @@ def test_validate_existing_cco(session, test_name, expected_code, message, monke
assert not err


@pytest.mark.parametrize(
'test_name, confirm_completion, expected_code, message',
[
# Missing entirely — schema catches it first as a required field violation
('FAIL_MISSING', None, HTTPStatus.UNPROCESSABLE_ENTITY, None),
# Present but False — business rule catches it
('FAIL_FALSE', False, HTTPStatus.BAD_REQUEST, 'Confirm Completion is required.'),
('SUCCESS', True, None, None),
]
)
def test_consent_continuation_out_confirm_completion(session, test_name, confirm_completion, expected_code, message, monkeypatch):
"""Assert confirmCompletionParty is required and must be true."""
monkeypatch.setattr(
'legal_api.services.flags.value',
lambda flag, default=None: "BC BEN CC ULC C CBEN CCC CUL" if flag == 'supported-consent-continuation-out-entities' else default
)
business = Business(
identifier='BC1234567',
legal_type='BC',
state=Business.State.ACTIVE,
founding_date=datetime.utcnow()
)
filing = copy.deepcopy(FILING_HEADER)
filing['filing']['consentContinuationOut'] = copy.deepcopy(CONSENT_CONTINUATION_OUT)
filing['filing']['header']['name'] = 'consentContinuationOut'

if confirm_completion is None:
filing['filing']['consentContinuationOut'].pop('confirmCompletionParty', None)
else:
filing['filing']['consentContinuationOut']['confirmCompletionParty'] = confirm_completion

err = validate(business, filing)

if test_name != 'SUCCESS':
assert expected_code == err.code
if message:
assert message == err.msg[0]['error']
else:
assert not err


@pytest.mark.parametrize(
'test_status, file_number, expected_code',
[
Expand Down
2 changes: 1 addition & 1 deletion python/common/business-registry-model/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
requires-python = ">=3.13,<3.14"
dependencies = [
"sql-versioning @ git+https://github.com/bcgov/lear.git@main#subdirectory=python/common/sql-versioning-alt",
"registry-schemas @ git+https://github.com/bcgov/business-schemas.git@2.18.83",
"registry-schemas @ git+https://github.com/bcgov/business-schemas.git@2.18.84",
"flask-migrate (>=4.1.0,<5.0.0)",
"pg8000 (>=1.31.2,<2.0.0)",
"pydantic (>=2.10.6,<3.0.0)",
Expand Down
Loading