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

Work Order #<%= workOrder.workOrderNumber || "(No Number)" %>

<% if (workOrder.workOrderCloseDate) { %>
Closed
<% } %>
Work Order #<%= workOrder.workOrderNumber || "(No Number)" %>
<% if (configFunctions.getConfigProperty("settings.workOrders.prints").length > 0) { %> <% if (configFunctions.getConfigProperty("settings.workOrders.prints").length === 1) { %> /?workOrderId=<%= workOrder.workOrderId %>" target="_blank" aria-label="Print"> Print <% } else { %> <% } %> <% } %> <% if (user.userProperties.canUpdate) { %> <% if (workOrder.workOrderCloseDate) { %> <% } else { %> Switch to Edit Mode Edit <% } %> <% } %>

Work Order Type
<%= workOrder.workOrderType %>

Description
<% if (workOrder.workOrderDescription) { %> <%= workOrder.workOrderDescription %> <% } else { %> (No Description) <% } %>

<%= configFunctions.getConfigProperty("aliases.workOrderOpenDate") %>
<%= workOrder.workOrderOpenDateString %>

<%= configFunctions.getConfigProperty("aliases.workOrderCloseDate") %>
<% if (workOrder.workOrderCloseDate) { %> <%= workOrder.workOrderCloseDateString %> <% } else { %> (No <%= configFunctions.getConfigProperty("aliases.workOrderCloseDate") %>) <% } %>

Related Burial Sites

<% const tabToSelect = (workOrder.workOrderContracts.length > 0 || workOrder.workOrderBurialSites.length === 0 ? "contracts" : "burialSites"); %>
" id="relatedTab--contracts"> <% if (workOrder.workOrderContracts.length === 0) { %>

There are no contracts associated with this work order.

<% } else { %> <% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %> <% for (const contract of workOrder.workOrderContracts) { %> <% const isActive = !(contract.contractEndDate && contract.contractEndDate < currentDate); %> <% } %>
Contract Type Burial Site Contract Date End Date Contacts
<% if (isActive) { %> <% } else { %> <% } %> <%= contract.contractType %>
#<%= contract.contractId %>
<% if (contract.burialSiteId) { %> <%= contract.burialSiteName %> <% } else { %> (No Burial Site) <% } %> <%= contract.contractStartDateString %> <% if (contract.contractEndDate) { %> <%= contract.contractEndDateString %> <% } else { %> (No End Date) <% } %>
    <% for (const interment of contract.contractInterments) { %>
  • <%= interment.deceasedName %>
  • <% } %> <% if (contract.purchaserName !== '') { %>
  • <%= contract.purchaserName %>
  • <% } %> <% if (contract.funeralHomeName) { %>
  • <%= contract.funeralHomeName %>
  • <% } %>
<% } %>
" id="relatedTab--burialSites"> <% if (workOrder.workOrderBurialSites.length === 0) { %>

There are no burial sites associated with this work order.

<% } else { %> <% for (const burialSite of workOrder.workOrderBurialSites) { %> <% } %>
Burial Site Cemetery Burial Site Type Status
<%= burialSite.burialSiteName %> <%= burialSite.cemeteryName %> <%= burialSite.burialSiteType %> <%= burialSite.burialSiteStatus %>
<% } %>
<% if (workOrder.workOrderComments.length > 0) { %>

Work Order Comments

<% for (const workOrderComment of workOrder.workOrderComments) { %> <% } %>
Commentor Comment Date Comment
<%= workOrderComment.recordCreate_userName %> <%= workOrderComment.commentDateString %> <%= (workOrderComment.commentTime === 0 ? "" : workOrderComment.commentTimePeriodString) %> <%= workOrderComment.comment %>
<% } %>
<% if (workOrder.workOrderMilestones.length > 0) { %>
<% for (const milestone of workOrder.workOrderMilestones) { %>
<% if (milestone.workOrderMilestoneCompletionDate) { %> <% } else { %> <% } %>
<% if (milestone.workOrderMilestoneTypeId) { %> <%= milestone.workOrderMilestoneType %>
<% } %> <% if (milestone.workOrderMilestoneDate === 0) { %> (No Set Date) <% } else { %> <%= milestone.workOrderMilestoneDateString %> <% } %> <% if (milestone.workOrderMilestoneTime !== 0) { %> <%= milestone.workOrderMilestoneTimePeriodString %> <% } %>
<%= milestone.workOrderMilestoneDescription %>
<% } %>
<% } %>
<%- include('_footerA'); -%> <%- include('_footerB'); -%>