-
Notifications
You must be signed in to change notification settings - Fork 75
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
24987 24989 - Update to enable NoW for temporary businesses #3155
24987 24989 - Update to enable NoW for temporary businesses #3155
Conversation
@@ -479,7 +479,8 @@ def put_basic_checks(identifier, filing, client_request, business) -> Tuple[dict | |||
if not filing_type: | |||
return ({'message': 'filing/header/name is a required property'}, HTTPStatus.BAD_REQUEST) | |||
|
|||
if filing_type not in CoreFiling.NEW_BUSINESS_FILING_TYPES and business is None: | |||
if filing_type not in CoreFiling.NEW_BUSINESS_FILING_TYPES + [CoreFiling.FilingTypes.NOTICEOFWITHDRAWAL] \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow filing NoW without an existing business
@@ -668,6 +674,9 @@ def get_filing_types(business: Business, filing_json: dict): # pylint: disable= | |||
|
|||
if filing_type in CoreFiling.NEW_BUSINESS_FILING_TYPES: | |||
legal_type = filing_json['filing'][filing_type]['nameRequest']['legalType'] | |||
elif business.identifier.startswith('T') and \ | |||
filing_type == CoreFiling.FilingTypes.NOTICEOFWITHDRAWAL: | |||
legal_type = filing_json['filing'].get('business', None).get('legalType') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for temporary business notice of withdraw, get legalType from filing json
filing.filing_type == Filing.FILINGS['noticeOfWithdrawal']['name']: | ||
mailing_address, corp_type, legal_name = \ | ||
ListFilingResource._get_address_from_withdrawn_new_business_filing(business, filing) | ||
business.legal_name = legal_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for temporary business notice of withdraw, get mailng_address, corp_type, legal_name from the withdrawn new business filing (e.g. IA, Continuation In, Amalgamation)
@@ -321,7 +321,8 @@ def get_allowable_filings_dict(): | |||
'legalTypes': ['BC', 'BEN', 'CC', 'ULC', 'C', 'CBEN', 'CUL', 'CCC'], | |||
'blockerChecks': { | |||
'business': [BusinessBlocker.FILING_WITHDRAWAL] | |||
} | |||
}, | |||
'businessRequirement': BusinessRequirement.NO_RESTRICTION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow NoW filing no matter there is an existing business or not for staff
legal-api/src/legal_api/resources/v2/business/business_filings/business_filings.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there already tests for NoW with a regular business filing (eg, COA, Alteration, others?)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I can only find unit tests for NoW validations with a regular business, gonna add them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
794e64d
to
d1bbfc7
Compare
|
Issue #: /bcgov/entity#24987
Issue #: /bcgov/entity#24989
Description of changes:
/api/v2/businesses/:identifier/filings
to enable NoW filing for T businessesLocal Verifications
1 - Update error code for not found withdrawn filing from 400 to 404
![Pasted image 20241227090017](https://private-user-images.githubusercontent.com/169101247/399025513-a10e7cfa-89e9-40ec-81cd-4a3dd2846a10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODM4NjIsIm5iZiI6MTczOTM4MzU2MiwicGF0aCI6Ii8xNjkxMDEyNDcvMzk5MDI1NTEzLWExMGU3Y2ZhLTg5ZTktNDBlYy04MWNkLTRhM2RkMjg0NmExMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxODA2MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYTcyYjg3NTYyYzVjYWIxZjc2M2JmMjc1ZWZmMmFjNzk5ZGRkYzMyMzA0MDkxYTQ1NzUxYTgzNmE1MWI4MGUwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.848sJ1LzvG0puzmQRAINqR-t8iHftezz6BfAIQG-s5c)
![Pasted image 20241227085851](https://private-user-images.githubusercontent.com/169101247/399025520-fbc0df01-e280-4f76-a18f-207288319982.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODM4NjIsIm5iZiI6MTczOTM4MzU2MiwicGF0aCI6Ii8xNjkxMDEyNDcvMzk5MDI1NTIwLWZiYzBkZjAxLWUyODAtNGY3Ni1hMThmLTIwNzI4ODMxOTk4Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxODA2MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NzFhNGU5NjUyOWI1ZWU5YjhjYTc2MmQ4ZjNhNGYwMzhkNTEyYzg4NDkxMzM4YjRmNGE0Yzk2ZjRhYTY1NjkyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EhIID9X37CyBgN2R0WSKPWOT1BAZWtoG_5sY18qEZqI)
Before:
After:
2 - Enable NoW filing for T businesses
![Pasted image 20241227154140](https://private-user-images.githubusercontent.com/169101247/399025579-418bf379-b3fd-41f6-b401-f3fdfd6bd860.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODM4NjIsIm5iZiI6MTczOTM4MzU2MiwicGF0aCI6Ii8xNjkxMDEyNDcvMzk5MDI1NTc5LTQxOGJmMzc5LWIzZmQtNDFmNi1iNDAxLWYzZmRmZDZiZDg2MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxODA2MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNzZhMDc4YjE4ZTNhOGIwM2FjYWJiM2FkNzRkN2M0NGEwMDVkOTc1NDYzNzNkNmZmYjEwYTZkMjIxYTM1ZTcyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XFmh_7IjXZfEfWPhbdYb8I2w1R77jsksUi28c3mZ5AM)
![Pasted image 20241227153246](https://private-user-images.githubusercontent.com/169101247/399025589-1ac57b36-070e-49c4-a5a2-46187d9027c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODM4NjIsIm5iZiI6MTczOTM4MzU2MiwicGF0aCI6Ii8xNjkxMDEyNDcvMzk5MDI1NTg5LTFhYzU3YjM2LTA3MGUtNDljNC1hNWEyLTQ2MTg3ZDkwMjdjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxODA2MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yY2EwM2JmN2RmMWUzZjJhZDUxN2I1ZTNhMjRhMmU2MGYxMzRkN2U0MDdhZTk2N2VjODg5OTZlNTM3OTA1MTUzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.oOOhAIwtXw6IWLr3TcHP1ty0fyMx5q0ze4MVkuiTJmU)
Before:
After:
3 - Not allow file other filings for T businesses
![Pasted image 20241227153353](https://private-user-images.githubusercontent.com/169101247/399025651-87bf2e70-1b13-4fd9-9135-89ea28115239.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODM4NjIsIm5iZiI6MTczOTM4MzU2MiwicGF0aCI6Ii8xNjkxMDEyNDcvMzk5MDI1NjUxLTg3YmYyZTcwLTFiMTMtNGZkOS05MTM1LTg5ZWEyODExNTIzOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxODA2MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYzA3MWQwM2U1OTljZjZlZGE3ZTBkNDMzMWIwNTk4ODgyNzUyMGRhNGY2OGU1YzJiYjJmNmU2NTAyMGJjYjk2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.q5w6uEHKhd21KHH4vi0RSd-gZdplH3A0Ioe9TaV04k8)
e.g. CoD
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).