Skip to content

Commit

Permalink
23354 - Misc updates for Notice of Withdrawal (bcgov#3010)
Browse files Browse the repository at this point in the history
* 23354 - misc updates

Signed-off-by: Hongjing Chen <[email protected]>

* fix linting-1

Signed-off-by: Hongjing Chen <[email protected]>

* modify testing identifier for continued in businesses

Signed-off-by: Hongjing Chen <[email protected]>

---------

Signed-off-by: Hongjing Chen <[email protected]>
  • Loading branch information
chenhongjing authored Sep 26, 2024
1 parent d9c1b5b commit e6f2c49
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions legal-api/src/legal_api/core/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Status(str, Enum):
PENDING = 'PENDING'
PAPER_ONLY = 'PAPER_ONLY'
PENDING_CORRECTION = 'PENDING_CORRECTION'
WITHDRAWN = 'WITHDRAWN'

# filings with staff review
APPROVED = 'APPROVED'
Expand Down Expand Up @@ -86,6 +87,7 @@ class FilingTypes(str, Enum):
DISSOLUTION = 'dissolution'
DISSOLVED = 'dissolved'
INCORPORATIONAPPLICATION = 'incorporationApplication'
NOTICEOFWITHDRAWAL = 'noticeOfWithdrawal'
PUTBACKON = 'putBackOn'
REGISTRARSNOTATION = 'registrarsNotation'
REGISTRARSORDER = 'registrarsOrder'
Expand Down
15 changes: 15 additions & 0 deletions legal-api/src/legal_api/core/meta/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,21 @@ class FilingTitles(str, Enum):
},
]
},
'noticeOfWithdrawal': {
'name': 'noticeOfWithdrawal',
'title': 'Notice of Withdrawal',
'displayName': 'Notice of Withdrawal',
'codes': {
'BC': 'NWITH',
'BEN': 'NWITH',
'ULC': 'NWITH',
'CC': 'NWITH',
'C': 'NWITH',
'CBEN': 'NWITH',
'CUL': 'NWITH',
'CCC': 'NWITH'
}
},
'putBackOn': {
'name': 'putBackOn',
'title': 'Put Back On',
Expand Down
16 changes: 16 additions & 0 deletions legal-api/src/legal_api/models/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Status(str, Enum):
PAID = 'PAID'
PENDING = 'PENDING'
PENDING_CORRECTION = 'PENDING_CORRECTION'
WITHDRAWN = 'WITHDRAWN'

# filings with staff review
APPROVED = 'APPROVED'
Expand Down Expand Up @@ -337,6 +338,21 @@ class Source(Enum):
},
'temporaryCorpTypeCode': 'TMP'
},
'noticeOfWithdrawal': {
'name': 'noticeOfWithdrawal',
'title': 'Notice of Withdrawal',
'displayName': 'Notice of Withdrawal',
'codes': {
'BC': 'NWITH',
'BEN': 'NWITH',
'ULC': 'NWITH',
'CC': 'NWITH',
'C': 'NWITH',
'CBEN': 'NWITH',
'CUL': 'NWITH',
'CCC': 'NWITH'
}
},
'registration': {
'name': 'registration',
'title': 'Registration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,9 @@ def test_calc_annual_report_date(session, client, jwt):
CONTINUATION_OUT_FILING = copy.deepcopy(FILING_HEADER)
CONTINUATION_OUT_FILING['filing']['continuationOut'] = {}

NOTICE_OF_WITHDRAWAL = copy.deepcopy(FILING_HEADER)
NOTICE_OF_WITHDRAWAL['filing']['noticeOfWithdrawal'] = {}


def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type):
"""Return fee codes for legal type."""
Expand Down Expand Up @@ -1096,6 +1099,14 @@ def _fee_code_asserts(business, filing_json: dict, multiple_fee_codes, expected_
('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BCOMP.value, False, []),
('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BC_ULC_COMPANY.value, False, []),
('BC1234567', CONTINUATION_OUT_FILING, 'continuationOut', Business.LegalTypes.BC_CCC.value, False, []),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.COMP.value, False, []),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP.value, False, []),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_ULC_COMPANY.value, False, []),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_CCC.value, False, []),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CONTINUE_IN.value, False, []),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP_CONTINUE_IN.value, False, []),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.ULC_CONTINUE_IN.value, False, []),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CCC_CONTINUE_IN.value, False, []),
]
)
def test_get_correct_fee_codes(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,9 @@ def test_calc_annual_report_date(session, client, jwt):
SPECIAL_RESOLUTION_NO_CON_FILING = copy.deepcopy(CP_SPECIAL_RESOLUTION_TEMPLATE)
del SPECIAL_RESOLUTION_NO_CON_FILING['filing']['changeOfName']

NOTICE_OF_WITHDRAWAL = copy.deepcopy(FILING_HEADER)
NOTICE_OF_WITHDRAWAL['filing']['noticeOfWithdrawal'] = {}


def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type):
"""Return fee codes for legal type."""
Expand Down Expand Up @@ -1185,6 +1188,14 @@ def _get_expected_fee_code(free, filing_name, filing_json: dict, legal_type):
False, [], False),
('CP1234567', CP_SPECIAL_RESOLUTION_TEMPLATE, 'specialResolution', Business.LegalTypes.COOP.value,
False, ['SPRLN', 'OTCON'], False),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.COMP.value, False, [], False),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP.value, False, [], False),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_ULC_COMPANY.value, False, [], False),
('BC1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BC_CCC.value, False, [], False),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CONTINUE_IN.value, False, [], False),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.BCOMP_CONTINUE_IN.value, False, [], False),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.ULC_CONTINUE_IN.value, False, [], False),
('C1234567', NOTICE_OF_WITHDRAWAL, 'noticeOfWithdrawal', Business.LegalTypes.CCC_CONTINUE_IN.value, False, [], False),
]
)
def test_get_correct_fee_codes(
Expand Down

0 comments on commit e6f2c49

Please sign in to comment.