<%- include('_header-print'); -%>

<%= configFunctions.getProperty("aliases.lot") %> <%= configFunctions.getProperty("aliases.occupancy") %>

<%= configFunctions.getProperty("aliases.occupancy") %> Type
<%= lotOccupancy.occupancyType %>

<%= configFunctions.getProperty("aliases.lot") %>
<% if (lotOccupancy.lotId) { %> <%= lotOccupancy.lotName %> <% } else { %> (No <%= configFunctions.getProperty("aliases.lot") %>) <% } %>

<%= configFunctions.getProperty("aliases.map") %>
<% if (lotOccupancy.mapId) { %> <%= lotOccupancy.mapName %> <% } else { %> (No <%= configFunctions.getProperty("aliases.map") %>) <% } %>

Start Date
<%= lotOccupancy.occupancyStartDateString %>

End Date
<%= (lotOccupancy.occupancyEndDateString === "" ? "(No End Date)" : lotOccupancy.occupancyEndDateString) %>

<% if (lotOccupancy.lotOccupancyFields.length > 0) { %>
<% for (const lotOccupancyField of lotOccupancy.lotOccupancyFields) { %>

<%= lotOccupancyField.occupancyTypeField %>
<%= lotOccupancyField.lotOccupancyFieldValue || "(No Value)" %>

<% } %>
<% } %>

<%= configFunctions.getProperty("aliases.occupants") %>

<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>

There are no <%= configFunctions.getProperty("aliases.occupants").toLowerCase() %> associated with this record.

<% } else { %> <% for (const lotOccupancyOccupant of lotOccupancy.lotOccupancyOccupants) { %> <% } %>
<%= configFunctions.getProperty("aliases.occupant") %> Type <%= configFunctions.getProperty("aliases.occupant") %> Address Phone Number
<%= lotOccupancyOccupant.lotOccupantType %> <%= lotOccupancyOccupant.occupantName %> <%= lotOccupancyOccupant.occupantAddress1 %>
<% if (lotOccupancyOccupant.occupantAddress2 && lotOccupancyOccupant.occupantAddress2 !== "") { %> <%= lotOccupancyOccupant.occupantAddress2 %>
<% } %> <% if (lotOccupancyOccupant.occupantCity) { %> <%= lotOccupancyOccupant.occupantCity %>, <% } %> <%= lotOccupancyOccupant.occupantProvince %>
<%= lotOccupancyOccupant.occupantPostalCode %>
<%= lotOccupancyOccupant.occupantPhoneNumber %>
<% } %>
<% if (lotOccupancy.lotOccupancyComments.length > 0) { %>

Comments

<% for (const lotOccupancyComment of lotOccupancy.lotOccupancyComments) { %> <% } %>
Commentor Comment Date Comment
<%= lotOccupancyComment.recordCreate_userName %> <%= lotOccupancyComment.lotOccupancyCommentDateString %> <%= (lotOccupancyComment.lotOccupancyCommentTime === 0 ? "" : lotOccupancyComment.lotOccupancyCommentTimeString) %> <%= lotOccupancyComment.lotOccupancyComment %>
<% } %>

Fees

<% if (lotOccupancy.lotOccupancyFees.length === 0) { %>

There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.

<% } else { %> <% let feeAmountTotal = 0; let taxAmountTotal = 0; %> <% for (const lotOccupancyFee of lotOccupancy.lotOccupancyFees) { %> <% feeAmountTotal += (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity); taxAmountTotal += (lotOccupancyFee.taxAmount * lotOccupancyFee.quantity); %> <% if (lotOccupancyFee.quantity !== 1) { %> <% } %> <% } %>
Fee Unit Cost × Quantity = Total
"> <%= lotOccupancyFee.feeName %> $<%= lotOccupancyFee.feeAmount.toFixed(2) %> × <%= lotOccupancyFee.quantity %> =$<%= (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity).toFixed(2) %>
Subtotal $<%= feeAmountTotal.toFixed(2) %>
Tax $<%= taxAmountTotal.toFixed(2) %>
Grand Total $<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %>
<% } %>

Transactions

<% if (lotOccupancy.lotOccupancyTransactions.length === 0) { %>

There are no transactions associated with this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.

<% } else { %> <% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %> <% } %>
Date <%= configFunctions.getProperty("aliases.externalReceiptNumber") %> Amount
<%= lotOccupancyTransaction.transactionDateString %> <%= lotOccupancyTransaction.externalReceiptNumber %>
<%= lotOccupancyTransaction.transactionNote %>
$<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %>
<% } %>
<%- include('_footer-print'); -%>