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

Fix permit registration report location missing legal description #1829

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions mhr_api/report-templates/exemptionV2.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,26 @@

<div class="separator mt-5"></div>
<div class="section-data mt-3">
Exempted pursuant to section 21 of the Manufactured Home Act by an order of the Registrar dated {{createDateTime}} on Document Registration Number {{documentRegistrationNumber}}.
{% if registrationType == 'EXEMPTION_NON_RES' %}
Exempted pursuant to section 21 of the Manufactured Home Act by an order of the Registrar dated {{createDateTime}}
on Document Registration Number {{documentRegistrationNumber}}.
{% else %}
Pursuant to section 21 of the Manufactured Home Act, this manufactured home is exempted from the act except section 32 by an order of the Registrar
dated {{createDateTime}} on Document Registration Number {{documentRegistrationNumber}}.
{% endif %}
</div>

<p style="page-break-before: always" ></p>
<div class="no-page-break">
<div class="section-title mt-5">Exemption Order</div>
<div class="section-data mt-3">
<span class="bold">I ORDER,</span> under section 21 of the Manufactured Home Act, that the manufactured home registered
under number {{mhrNumber}} be exempt from the Act. The exemption was processed under document registration number {{documentRegistrationNumber}}.
{% if registrationType == 'EXEMPTION_NON_RES' %}
<span class="bold">I ORDER,</span> under section 21 of the Manufactured Home Act, that the manufactured home registered
under number {{mhrNumber}} be exempt from the Act. The exemption was processed under document registration number {{documentRegistrationNumber}}.
{% else %}
<span class="bold">I ORDER,</span> under section 21 of the Manufactured Home Act, that the manufactured home registered
under number {{mhrNumber}} be exempt from the Act except section 32. The exemption was processed under document registration number {{documentRegistrationNumber}}.
{% endif %}
</div>
<div class="section-data mt-3">
{% if registrationType == 'EXEMPTION_NON_RES' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
{{location.bandName}}&nbsp;
{% endif %}
{% if location.reserveNumber is defined and location.reserveNumber != '' %}
{{location.reserveNumber}}&nbsp;
RESERVATION #{{location.reserveNumber}}&nbsp;
{% endif %}
{% if location.additionalDescription is defined and location.additionalDescription != '' %}
{{ location.additionalDescription }}
Expand Down Expand Up @@ -177,7 +177,7 @@
{{location.bandName}}&nbsp;
{% endif %}
{% if location.reserveNumber is defined and location.reserveNumber != '' %}
{{location.reserveNumber}}&nbsp;
RESERVATION #{{location.reserveNumber}}&nbsp;
{% endif %}
{% if location.additionalDescription is defined and location.additionalDescription != '' %}
{{ location.additionalDescription }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
{{detail.location.bandName}}&nbsp;
{% endif %}
{% if detail.location.reserveNumber is defined and detail.location.reserveNumber != '' %}
{{detail.location.reserveNumber}}&nbsp;
RESERVATION #{{detail.location.reserveNumber}}&nbsp;
{% endif %}
{% if detail.location.additionalDescription is defined and detail.location.additionalDescription != '' %}
{{ detail.location.additionalDescription }}
Expand Down Expand Up @@ -165,7 +165,7 @@
{{detail.location.bandName}}&nbsp;
{% endif %}
{% if detail.location.reserveNumber is defined and detail.location.reserveNumber != '' %}
{{detail.location.reserveNumber}}&nbsp;
RESERVATION #{{detail.location.reserveNumber}}&nbsp;
{% endif %}
{% if detail.location.additionalDescription is defined and detail.location.additionalDescription != '' %}
{{ detail.location.additionalDescription }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,21 @@
Registration of this home was cancelled under Section 11(1) of the Manufactured Home Act by the Registrar of Manufactured Homes.
{% elif message.messageType == 'WIDTH' %}
SPECIAL TRANSPORT RESTRICTIONS APPLY TO THIS HOME DUE TO THE WIDTH. PLEASE CONTACT PROVINCIAL PERMIT CENTRE 1-800-559-9688 FOR FURTHER DETAILS.
{% elif message.messageType in ('EXNR', 'EXRS') %}
Exempted pursuant to section 21 of the Manufactured Home Act by an order of the Registrar dated {{message.messageDate}} on Document Registration Number {{message.messageId}}.
{% elif message.messageType == 'EXRS' %}
Pursuant to section 21 of the Manufactured Home Act, this manufactured home is exempted from the Act except section 32
by an order of the Registrar dated {{message.messageDate}} on Document Registration Number {{message.messageId}}.
<div class="pt-5">
{% if message.messageType == 'EXRS' %}
If this manufactured home is to be moved from the land to which it is attached, or a person buying it wishes to reflect their name on the
ownership in the Manufactured Home Registry, this exemption order expires. The manufactured home will be subject to the
Manufactured Home Act, and the registration of this manufactured home must be restored.
{% else %}
</div>
{% elif message.messageType == 'EXNR' %}
Exempted pursuant to section 21 of the Manufactured Home Act by an order of the Registrar dated {{message.messageDate}}
on Document Registration Number {{message.messageId}}.
<div class="pt-5">
If this manufactured home returned to use for residential accommodation, or a person buying it wishes to reflect their name on the
ownership in the Manufactured Home Registry, this exemption order expires. The manufactured home will be subject to the
Manufactured Home Act, and the registration of this manufactured home must be restored.
{% endif %}
</div>
{% elif message.messageType == 'EXEMPT' %}
Exempted pursuant to Section 21 of the Manufactured Home Act by an order of the Registrar of the Manufactured Home Registry.
Expand Down
2 changes: 1 addition & 1 deletion mhr_api/src/mhr_api/models/db2/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def create_from_registration(registration, reg_json, update: bool = False):
if new_info.get('bandName'):
additional_desc += str(new_info.get('bandName')).strip().upper() + ' '
if new_info.get('reserveNumber'):
additional_desc += str(new_info.get('reserveNumber')).strip() + ' '
additional_desc += 'RESERVATION #' + str(new_info.get('reserveNumber')).strip() + ' '
if new_info.get('additionalDescription'):
additional_desc += new_info.get('additionalDescription')
if additional_desc:
Expand Down
3 changes: 2 additions & 1 deletion mhr_api/src/mhr_api/reports/v2/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ def _set_owner_groups(self):

def _set_location(self):
"""Set up report location information."""
if self._report_key in (ReportTypes.MHR_REGISTRATION, ReportTypes.MHR_EXEMPTION):
if self._report_key in (ReportTypes.MHR_REGISTRATION, ReportTypes.MHR_EXEMPTION,
ReportTypes.MHR_ADMIN_REGISTRATION, ReportTypes.MHR_TRANSPORT_PERMIT):
location = self._report_data.get('location')
if location.get('lot') or location.get('parcel') or location.get('block') or location.get('districtLot') or\
location.get('partOf') or location.get('section') or location.get('township') or \
Expand Down