Skip to content

Commit

Permalink
23054 resolution date in amlagamationApplication (Horizontal & Vertic…
Browse files Browse the repository at this point in the history
…al) document (#2973)
  • Loading branch information
vysakh-menon-aot authored Sep 9, 2024
1 parent a14ac1a commit 71faad5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
18 changes: 10 additions & 8 deletions legal-api/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Flask",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "flask",
"env": {
Expand All @@ -31,12 +31,14 @@
"justMyCode": false
},
{
"name": "Python: Debug Unit Tests",
"type": "python",
"request": "launch",
"purpose": ["debug-test"],
"console": "integratedTerminal",
"justMyCode": false
"name": "Python: Debug Unit Tests",
"type": "debugpy",
"request": "launch",
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"justMyCode": false
}
]
}
1 change: 1 addition & 0 deletions legal-api/report-templates/amalgamationApplication.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
[[common/statement.html]]
[[common/addresses.html]]
[[common/directors.html]]
[[common/resolutionDates.html]]
[[common/shareStructure.html]]
</div>
</body>
Expand Down
11 changes: 11 additions & 0 deletions legal-api/src/legal_api/reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,17 @@ def _set_from_primary_or_holding_business_data(self, filing): # pylint: disable
share_classes.append(share_class.json)
filing['shareClasses'] = share_classes

# copy resolution dates
resolutions = []
if self._filing.transaction_id:
resolutions = VersionedBusinessDetailsService.get_resolution_dates_revision(
self._filing.transaction_id,
primary_or_holding_business.id)
else:
for resolution in primary_or_holding_business.resolutions.all():
resolutions.append({'date': resolution.resolution_date.strftime(OUTPUT_DATE_FORMAT)})
filing['resolutions'] = resolutions

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
4 changes: 2 additions & 2 deletions legal-api/src/legal_api/services/authz.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ def get_allowable_filings_dict():
'fullRestoration': {
'legalTypes': ['BC', 'BEN', 'CC', 'ULC', 'C', 'CBEN', 'CUL', 'CCC'],
'blockerChecks': {
'invalidStateFilings': ['continuationIn', 'continuationOut'],
'invalidStateFilings': ['continuationOut'],
'business': [BusinessBlocker.AMALGAMATING_BUSINESS]
}
},
'limitedRestoration': {
'legalTypes': ['BC', 'BEN', 'CC', 'ULC', 'C', 'CBEN', 'CUL', 'CCC'],
'blockerChecks': {
'invalidStateFilings': ['continuationIn', 'continuationOut'],
'invalidStateFilings': ['continuationOut'],
'business': [BusinessBlocker.AMALGAMATING_BUSINESS]
}
}
Expand Down
10 changes: 5 additions & 5 deletions legal-api/tests/unit/services/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2347,13 +2347,13 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.RESTRN_FULL_CORPS,
FilingKey.RESTRN_LTD_CORPS])),
('staff_historical_corps_invalid_state_filing_fail', Business.State.HISTORICAL, ['BC', 'BEN', 'CC', 'ULC'],
'staff', [STAFF_ROLE], ['continuationIn', 'continuationOut'], [None, None],
'staff', [STAFF_ROLE], ['continuationOut'], [None, None],
expected_lookup([FilingKey.COURT_ORDER,
FilingKey.PUT_BACK_ON,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER])),
('staff_historical_continue_in_corps_invalid_state_filing_fail', Business.State.HISTORICAL,
['C', 'CBEN', 'CCC', 'CUL'], 'staff', [STAFF_ROLE], ['continuationIn', 'continuationOut'], [None, None],
['C', 'CBEN', 'CCC', 'CUL'], 'staff', [STAFF_ROLE], ['continuationOut'], [None, None],
expected_lookup([FilingKey.COURT_ORDER,
FilingKey.PUT_BACK_ON,
FilingKey.REGISTRARS_NOTATION,
Expand All @@ -2369,11 +2369,11 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
# historical business - general user
('general_user_historical_cp_unaffected', Business.State.HISTORICAL, ['CP'], 'general', [BASIC_USER],
['dissolution', 'continuationIn', None], [None, None, None], []),
['dissolution', None], [None, None, None], []),
('general_user_historical_corps_unaffected', Business.State.HISTORICAL, ['BC', 'BEN', 'CC', 'ULC'], 'general',
[BASIC_USER], ['dissolution', 'continuationIn', 'continuationOut', None], [None, None, None, None], []),
[BASIC_USER], ['dissolution', 'continuationOut', None], [None, None, None, None], []),
('general_user_historical_continue_in_corps_unaffected', Business.State.HISTORICAL, ['C', 'CBEN', 'CCC', 'CUL'],
'general', [BASIC_USER], ['dissolution', 'continuationIn', 'continuationOut', None],
'general', [BASIC_USER], ['dissolution', 'continuationOut', None],
[None, None, None, None], []),
('general_user_historical_llc_unaffected', Business.State.HISTORICAL, ['LLC'], 'general', [BASIC_USER],
['dissolution', None], [None, None], []),
Expand Down

0 comments on commit 71faad5

Please sign in to comment.