Skip to content

Commit

Permalink
Securities Act Notice outputs, discharge registration. (#1867)
Browse files Browse the repository at this point in the history
* Securities Act Notice outputs, discharge registration.

Signed-off-by: Doug Lovett <doug@diamante.ca>

* Securities Act Notice add flag to user profile, update unit test.

Signed-off-by: Doug Lovett <doug@diamante.ca>

* Updates to outputs from UXA review.

Signed-off-by: Doug Lovett <doug@diamante.ca>

---------

Signed-off-by: Doug Lovett <doug@diamante.ca>
  • Loading branch information
doug-lovett authored May 10, 2024
1 parent 653ba3b commit b8aebac
Show file tree
Hide file tree
Showing 18 changed files with 229 additions and 123 deletions.
Original file line number Diff line number Diff line change
@@ -1,132 +1,102 @@
<div>
{% if securitiesActNotices is defined and change is not defined %}
<div class="separator mt-5"></div>
{% endif %}
<div class="section-title mt-3">Securities Act Notices</div>
{% if securitiesActNotices is defined and change is not defined %}
<div class="separator mt-5"></div>
{% endif %}
<div class="no-page-break">
<div class="section-title mt-3">Securities Act Notice</div>
{% if securitiesActNotices is defined and change is not defined %}
{% for notice in securitiesActNotices %}
<div class="section-sub-title-blue mt-3">{{ notice.registrationDescription|title }}</div>
<table class="no-page-break section-data court-order-table mt-3" role="presentation">
<tr>
<td class="section-sub-title">Type of Notice:</td>
<td>{{ notice.securitiesActNoticeType|title }}</td>
</tr>
<tr>
<td class="section-sub-title">Effective Date:</td>
<td>
{% if notice.effectiveDateTime is defined and notice.effectiveDateTime != '' %}
{{ notice.effectiveDateTime }}
{% else %}
N/A
{% endif %}
</td>
</tr>
<tr>
<td class="section-sub-title">Detail Description:</td>
<td>
{% if notice.description is defined and notice.description != '' %}
{{ notice.description }}
{% else %}
N/A
{% endif %}
</td>
</tr>
</table>
{% if notice.securitiesActOrders %}
<div class="section-title mt-1">Notice Court/Commission Order(s)</div>
{% for order in notice.securitiesActOrders %}
<table class="no-page-break section-data court-order-table mt-1" role="presentation">
<tr>
<td class="section-sub-title">Type of Order:</td>
<td>{% if order.courtOrder %}Court{% else %}Commission{% endif %} Order</td>
</tr>
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{% if order.courtName %}{{ order.courtName }}{% else %}N/A{% endif %}</td>
</tr>
<div class="section-sub-title-blue mt-6 mb-2">{% if order.courtOrder %}Court Order {% else %}Security Commission Order{% endif %}</div>
<table class="no-page-break section-data court-order-table" role="presentation">
{% if order.courtName is defined %}
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{{ order.courtName }}</td>
</tr>
{% endif %}
{% if order.courtRegistry is defined %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{{ order.courtRegistry }}</td>
</tr>
{% endif %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{% if order.courtRegistry %}{{ order.courtRegistry }}{% else %}N/A{% endif %}</td>
<td class="section-sub-title">{% if order.courtOrder %}Court{% else %}Commission{% endif %} File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Date of Order:</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% else %}N/A{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% else %}N/A{% endif %}</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Effect of Order:</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% else %}N/A{% endif %}</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% endif %}</td>
</tr>
</table>
{% endfor %}
{% endif %}
{% if not loop.last %}
<div class="separator-table-row mt-3 mb-3"></div>
<div class="separator-table-row mt-5 mb-5"></div>
{% endif %}
{% endfor %}
{% elif change is defined and change.securitiesActNotices is defined %}
{% for notice in change.securitiesActNotices %}
<div class="section-sub-title-blue mt-3">{{ notice.registrationDescription|title }}</div>
<table class="no-page-break section-data court-order-table mt-3" role="presentation">
<tr>
<td class="section-sub-title">Type of Notice:</td>
<td>{{ notice.securitiesActNoticeType|title }}</td>
</tr>
<tr>
<td class="section-sub-title">Effective Date:</td>
<td class="section-sub-title">Date of Effectiveness:</td>
<td>
{% if notice.effectiveDateTime is defined and notice.effectiveDateTime != '' %}
{{ notice.effectiveDateTime }}
{% else %}
N/A
{% endif %}
</td>
</tr>
<tr>
<td class="section-sub-title">Detail Description:</td>
<td>
{% if notice.description is defined and notice.description != '' %}
{{ notice.description }}
{% else %}
N/A
{% endif %}
</td>
</tr>
</table>
{% if notice.securitiesActOrders %}
<div class="section-title mt-1">Notice Court/Commission Order(s)</div>
{% for order in notice.securitiesActOrders %}
<table class="no-page-break section-data court-order-table mt-1" role="presentation">
<tr>
<td class="section-sub-title">Type of Order:</td>
<td>{% if order.courtOrder %}Court{% else %}Commission{% endif %} Order</td>
</tr>
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{% if order.courtName %}{{ order.courtName }}{% else %}N/A{% endif %}</td>
</tr>
<div class="section-sub-title-blue mt-6 mb-2">{% if order.courtOrder %}Court Order {% else %}Security Commission Order{% endif %}</div>
<table class="no-page-break section-data court-order-table" role="presentation">
{% if order.courtName is defined %}
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{{ order.courtName }}</td>
</tr>
{% endif %}
{% if order.courtRegistry is defined %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{{ order.courtRegistry }}</td>
</tr>
{% endif %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{% if order.courtRegistry %}{{ order.courtRegistry }}{% else %}N/A{% endif %}</td>
<td class="section-sub-title">{% if order.courtOrder %}Court{% else %}Commission{% endif %} File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Date of Order:</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% else %}N/A{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% else %}N/A{% endif %}</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Effect of Order:</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% else %}N/A{% endif %}</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% endif %}</td>
</tr>
</table>
{% endfor %}
{% endif %}
{% if not loop.last %}
<div class="separator-table-row mt-3 mb-3"></div>
<div class="separator-table-row mt-5 mb-5"></div>
{% endif %}
{% endfor %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,8 @@
{% if detail.financingStatement.courtOrderInformation is defined %}
[[search-result/courtOrderInformation.html]]
{% endif %}
{% if detail.financingStatement.type == 'SE' %}
[[search-result/securitiesActNotice.html]]
{% endif %}
[[search-result/registeringParty.html]]
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{% if detail.financingStatement.securitiesActNotices is defined and change is not defined %}
<div class="separator mt-5"></div>
{% endif %}
<div class="no-page-break">
<div class="section-title mt-3">Securities Act Notice</div>
{% if detail.financingStatement.securitiesActNotices is defined and change is not defined %}
{% for notice in detail.financingStatement.securitiesActNotices %}
<div class="section-sub-title-blue mt-3">{{ notice.registrationDescription|title }}</div>
<table class="no-page-break section-data court-order-table mt-3" role="presentation">
<tr>
<td class="section-sub-title">Effective Date:</td>
<td>
{% if notice.effectiveDateTime is defined and notice.effectiveDateTime != '' %}
{{ notice.effectiveDateTime }}
{% endif %}
</td>
</tr>
</table>
{% if notice.securitiesActOrders %}
{% for order in notice.securitiesActOrders %}
<div class="section-sub-title-blue mt-6 mb-2">{% if order.courtOrder %}Court Order {% else %}Security Commission Order{% endif %}</div>
<table class="no-page-break section-data court-order-table" role="presentation">
{% if order.courtName is defined %}
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{{ order.courtName }}</td>
</tr>
{% endif %}
{% if order.courtRegistry is defined %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{{ order.courtRegistry }}</td>
</tr>
{% endif %}
<tr>
<td class="section-sub-title">{% if order.courtOrder %}Court{% else %}Commission{% endif %} File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Date of Order:</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Effect of Order:</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% endif %}</td>
</tr>
</table>
{% endfor %}
{% endif %}
{% if not loop.last %}
<div class="separator-table-row mt-5 mb-5"></div>
{% endif %}
{% endfor %}
{% elif change is defined and change.securitiesActNotices is defined %}
{% for notice in change.securitiesActNotices %}
<div class="section-sub-title-blue mt-3">{{ notice.registrationDescription|title }}</div>
<table class="no-page-break section-data court-order-table mt-3" role="presentation">
<tr>
<td class="section-sub-title">Date of Effectiveness:</td>
<td>
{% if notice.effectiveDateTime is defined and notice.effectiveDateTime != '' %}
{{ notice.effectiveDateTime }}
{% endif %}
</td>
</tr>
</table>
{% if notice.securitiesActOrders %}
{% for order in notice.securitiesActOrders %}
<div class="section-sub-title-blue mt-6 mb-2">{% if order.courtOrder %}Court Order {% else %}Security Commission Order{% endif %}</div>
<table class="no-page-break section-data court-order-table" role="presentation">
{% if order.courtName is defined %}
<tr>
<td class="section-sub-title">Name of Court:</td>
<td>{{ order.courtName }}</td>
</tr>
{% endif %}
{% if order.courtRegistry is defined %}
<tr>
<td class="section-sub-title">Registry</td>
<td>{{ order.courtRegistry }}</td>
</tr>
{% endif %}
<tr>
<td class="section-sub-title">{% if order.courtOrder %}Court{% else %}Commission{% endif %} File Number:</td>
<td>{% if order.fileNumber %}{{ order.fileNumber }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Date of Order:</td>
<td>{% if order.orderDate %}{{ order.orderDate }}{% endif %}</td>
</tr>
<tr>
<td class="section-sub-title">Effect of Order:</td>
<td>{% if order.effectOfOrder %}{{ order.effectOfOrder }}{% endif %}</td>
</tr>
</table>
{% endfor %}
{% endif %}
{% if not loop.last %}
<div class="separator-table-row mt-5 mb-5"></div>
{% endif %}
{% endfor %}
{% endif %}
</div>
10 changes: 10 additions & 0 deletions ppr-api/report-templates/template-parts/v2/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,16 @@
font-weight: bold;
}

.section-sub-title-blue {
font-family: 'BC Sans', sans-serif !important;
color: #234075;
font-size: 11pt;
font-weight: bold;
text-align: left;
line-height: 15px;
font-weight: bold;
}

.section-statement {
font-family: 'BC Sans', sans-serif !important;
color: #234075;
Expand Down
6 changes: 3 additions & 3 deletions ppr-api/src/ppr_api/models/financing_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def find_by_registration_number(cls, registration_num: str,

if not statement:
raise BusinessException(
error=model_utils.ERR_FINANCING_NOT_FOUND.format(code=ResourceErrorCodes.NOT_FOUND_ERR,
error=model_utils.ERR_FINANCING_NOT_FOUND.format(code=ResourceErrorCodes.NOT_FOUND_ERR.value,
registration_num=registration_num),
status_code=HTTPStatus.NOT_FOUND
)
Expand All @@ -492,7 +492,7 @@ def find_by_registration_number(cls, registration_num: str,
account_id)
if not extra_reg:
raise BusinessException(
error=model_utils.ERR_REGISTRATION_ACCOUNT.format(code=ResourceErrorCodes.UNAUTHORIZED_ERR,
error=model_utils.ERR_REGISTRATION_ACCOUNT.format(code=ResourceErrorCodes.UNAUTHORIZED_ERR.value,
account_id=account_id,
registration_num=registration_num),
status_code=HTTPStatus.UNAUTHORIZED
Expand All @@ -502,7 +502,7 @@ def find_by_registration_number(cls, registration_num: str,
return statement
if model_utils.is_historical(statement, create): # and (not staff or create):
raise BusinessException(
error=model_utils.ERR_FINANCING_HISTORICAL.format(code=ResourceErrorCodes.HISTORICAL_ERR,
error=model_utils.ERR_FINANCING_HISTORICAL.format(code=ResourceErrorCodes.HISTORICAL_ERR.value,
registration_num=registration_num),
status_code=HTTPStatus.BAD_REQUEST
)
Expand Down
4 changes: 1 addition & 3 deletions ppr-api/src/ppr_api/models/registration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ def create_securities_act_notices(registration, json_data: dict):
json_data.get('securitiesActNotices'):
notices = []
for notice_json in json_data.get('securitiesActNotices'):
notices.append(SecuritiesActNotice.create_from_json(notice_json,
registration.registration_ts,
registration.id))
notices.append(SecuritiesActNotice.create_from_json(notice_json, registration.id))
registration.securities_act_notices = notices
return registration
Loading

0 comments on commit b8aebac

Please sign in to comment.