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

24987 24989 - Update to enable NoW for temporary businesses #3155

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

eason-pan-bc
Copy link
Collaborator

Issue #: /bcgov/entity#24987
Issue #: /bcgov/entity#24989

Description of changes:

  • Update error code for not found withdrawn filing from 400 to 404
  • Update code around /api/v2/businesses/:identifier/filings to enable NoW filing for T businesses
  • Add and update unit tests

Local Verifications

1 - Update error code for not found withdrawn filing from 400 to 404
Before:
Pasted image 20241227090017
After:
Pasted image 20241227085851

2 - Enable NoW filing for T businesses
Before:
Pasted image 20241227154140
After:
Pasted image 20241227153246

3 - Not allow file other filings for T businesses
e.g. CoD
Pasted image 20241227153353

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).

@eason-pan-bc eason-pan-bc self-assigned this Dec 28, 2024
@@ -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] \
Copy link
Collaborator Author

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')
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

@eason-pan-bc eason-pan-bc Dec 28, 2024

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

@eason-pan-bc eason-pan-bc marked this pull request as ready for review December 28, 2024 00:40
legal_type = business.legal_type
# for temporary business notice of withdraw, get legalType from filing json
elif filing_type == CoreFiling.FilingTypes.NOTICEOFWITHDRAWAL.value:
legal_type = filing_json['filing'].get('business', None).get('legalType')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work if the NoW is for a regular business? (eg, withdrawing a FE alteration)

Copy link
Collaborator

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?)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants