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

18801 - add list of documents for amalgamation #2363

Merged
merged 2 commits into from
Dec 19, 2023
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
13 changes: 13 additions & 0 deletions legal-api/report-templates/amalgamationApplication.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[macros.html]]

<!DOCTYPE html>
<html lang="en">
<head>
<title>Amalgamation Application</title>
<meta charset="UTF-8">
<meta name="author" content="BC Registries and Online Services">
[[common/style.html]]
</head>
<body>
</body>
</html>
14 changes: 14 additions & 0 deletions legal-api/report-templates/certificateOfAmalgamation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[macros.html]]

<!DOCTYPE html>
<html lang="en">
<head>
<title>Certificate of Amalgamation</title>
<meta charset="UTF-8">
<meta name="author" content="BC Registries and Online Services">
[[common/certificateStyle.html]]
</head>
<body>
</body>
[[common/certificateFooter.html]]
</html>
2 changes: 1 addition & 1 deletion legal-api/src/legal_api/core/meta/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class FilingTitles(str, Enum):
'amalgamationApplication': {
'name': 'amalgamationApplication',
'additional': [
{'types': 'BC,ULC,BEN,CC', 'outputs': ['noticeOfArticles', 'certificate']},
{'types': 'BC,ULC,BEN,CC', 'outputs': ['noticeOfArticles', 'certificateOfAmalgamation']},
],
'regular': {
'name': 'regularAmalgamation',
Expand Down
16 changes: 16 additions & 0 deletions legal-api/src/legal_api/reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ def _format_filing_json(self, filing): # pylint: disable=too-many-branches, too
self._format_agm_extension_data(filing)
elif self._report_key == 'letterOfAgmLocationChange':
self._format_agm_location_change_data(filing)
elif self._report_key == 'amalgamationApplication':
self._format_amalgamation_data(filing)
elif self._report_key == 'certificateOfAmalgamation':
self._format_certificate_of_amalgamation_data(filing)
else:
# set registered office address from either the COA filing or status quo data in AR filing
with suppress(KeyError):
Expand Down Expand Up @@ -669,6 +673,14 @@ def _format_alteration_data(self, filing):
filing['newLegalTypeDescription'] = self._get_legal_type_description(new_legal_type)\
if new_legal_type else None

def _format_amalgamation_data(self, filling):
# FUTURE: format logic for amalgamation application
return

def _format_certificate_of_amalgamation_data(self, filing):
# FUTURE: format logic for certificate of amalgamation
return

def _format_change_of_registration_data(self, filing, filing_type): # noqa: E501 # pylint: disable=too-many-locals, too-many-branches, too-many-statements
prev_completed_filing = Filing.get_previous_completed_filing(self._filing)
versioned_business = VersionedBusinessDetailsService.\
Expand Down Expand Up @@ -1095,6 +1107,10 @@ class ReportMeta: # pylint: disable=too-few-public-methods
'filingDescription': 'Amalgamation Application',
'fileName': 'amalgamationApplication'
},
'certificateOfAmalgamation': {
'filingDescription': 'Certificate Of Amalgamation',
'fileName': 'certificateOfAmalgamation'
},
'certificate': {
'filingDescription': 'Certificate of Incorporation',
'fileName': 'certificateOfIncorporation'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
ALTERATION_FILING_TEMPLATE,
AGM_EXTENSION,
AGM_LOCATION_CHANGE,
AMALGAMATION_APPLICATION,
ANNUAL_REPORT,
CHANGE_OF_ADDRESS,
CHANGE_OF_DIRECTORS,
Expand Down Expand Up @@ -919,6 +920,36 @@ def test_unpaid_filing(session, client, jwt):
},
HTTPStatus.OK, '2017-10-01'
),
('ben_amalgamation_completed', 'BC7654321',
Business.LegalTypes.BCOMP.value, 'amalgamationApplication', AMALGAMATION_APPLICATION,
None, None, Filing.Status.COMPLETED,
{'documents': {
'certificateOfAmalgamation': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/certificateOfAmalgamation',
'legalFilings': [
{
'amalgamationApplication': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/amalgamationApplication'
}
],
'noticeOfArticles': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/noticeOfArticles',
'receipt': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/receipt'
}
},
HTTPStatus.OK, '2017-10-01'
),
('ben_amalgamation_paid', 'BC7654321',
Business.LegalTypes.BCOMP.value, 'amalgamationApplication', AMALGAMATION_APPLICATION,
None, None, Filing.Status.PAID,
{'documents': {
'legalFilings': [
{
'amalgamationApplication': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/amalgamationApplication'
}
],
'receipt': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/receipt'
}
},
HTTPStatus.OK, '2017-10-01'
),
('ben_changeOfAddress', 'BC7654321', Business.LegalTypes.BCOMP.value,
'changeOfAddress', CHANGE_OF_ADDRESS, None, None, Filing.Status.COMPLETED,
{'documents': {'noticeOfArticles': f'{base_url}/api/v2/businesses/BC7654321/filings/1/documents/noticeOfArticles',
Expand Down
Loading