Skip to content

Commit

Permalink
24552 - Update Resolution Section in Outputs + NOA (bcgov#3106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArwenQin authored Dec 2, 2024
1 parent 18539c7 commit 58da115
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="separator mt-4"></div>
<div class="section-title mt-4">Resolution or Court Order Dates</div>
<div class="section-data mt-4">
Date(s) of Resolution(s) or Court Order(s) attaching or altering Special Rights
and Restrictions attached to a class or a series of shares:
Dates of resolutions or court orders that change the company’s share structure.
This includes changes to the special rights or restrictions on a class or series of shares.
</div>
<ul class="section-data resolution-date-list">
{% for resolution in resolutions %}
Expand Down
17 changes: 15 additions & 2 deletions legal-api/src/legal_api/reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,11 @@ def _format_transition_data(self, filing):
self._format_address(filing['offices']['recordsOffice']['mailingAddress'])
if filing.get('shareStructure', {}).get('shareClasses', None):
filing['shareClasses'] = filing['shareStructure']['shareClasses']
dates = filing['shareStructure'].get('resolutionDates', [])
formatted_dates = [
datetime.fromisoformat(date).strftime(OUTPUT_DATE_FORMAT) for date in dates
]
filing['resolutions'] = formatted_dates

def _format_incorporation_data(self, filing):
self._format_address(filing['incorporationApplication']['offices']['registeredOffice']['deliveryAddress'])
Expand Down Expand Up @@ -672,7 +677,11 @@ def _format_alteration_data(self, filing):
self._filing.transaction_id, self._business.id)
if filing['alteration'].get('shareStructure', None):
filing['shareClasses'] = filing['alteration']['shareStructure'].get('shareClasses', [])
filing['resolutions'] = filing['alteration']['shareStructure'].get('resolutionDates', [])
dates = filing['alteration']['shareStructure'].get('resolutionDates', [])
formatted_dates = [
datetime.fromisoformat(date).strftime(OUTPUT_DATE_FORMAT) for date in dates
]
filing['resolutions'] = formatted_dates

to_legal_name = None
if self._filing.status == 'COMPLETED':
Expand Down Expand Up @@ -1137,7 +1146,11 @@ def _format_party_data(self, filing, prev_completed_filing: Filing):

def _format_share_class_data(self, filing, prev_completed_filing: Filing): # pylint: disable=too-many-locals; # noqa: E501;
filing['shareClasses'] = filing.get('correction').get('shareStructure', {}).get('shareClasses')
filing['resolutions'] = filing.get('correction').get('shareStructure', {}).get('resolutionDates', [])
dates = filing['correction']['shareStructure'].get('resolutionDates', [])
formatted_dates = [
datetime.fromisoformat(date).strftime(OUTPUT_DATE_FORMAT) for date in dates
]
filing['resolutions'] = formatted_dates
filing['newShareClasses'] = []
if filing.get('shareClasses'):
prev_share_class_json = VersionedBusinessDetailsService.get_share_class_revision(
Expand Down

0 comments on commit 58da115

Please sign in to comment.