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

<%= configFunctions.getProperty("aliases.occupancy") %>: <%= lotOccupancy.lotName %>

<% if (user.userProperties.canUpdate) { %>
" href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>/edit"> Update <%= configFunctions.getProperty("aliases.occupancy") %>
<% } %>

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

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

<%= configFunctions.getProperty("aliases.map") %>
<%= lotOccupancy.mapName %>

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 %>
<% } %> <%= 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 { %> <% } %>
<%- include('_footerA'); -%> <%- include('_footerB'); -%>