<%- include('_header'); -%> <% if (isCreate) { %>

Create a New Contract

<% } else { %>

Update Contract #<%= contract.contractId %>

<% } %>
<% if (!isCreate) { %> Contract #<%= contract.contractId %>: <%= contract.burialSiteName || ("(No Burial Site)") %> <% } %>
<% if (!isCreate && contractTypePrints.length > 0) { %> <% if (contractTypePrints.length === 1) { %> <% } else { %>
<% } %> <% } %> <% if (isCreate) { %> <% } else { %> <% } %>
" id="contract--burialSiteName" type="button" value="<%= contract.burialSiteName || "(No Burial Site)" %>" <%= (configFunctions.getConfigProperty("settings.contracts.burialSiteIdIsRequired") ? " required" : "") %> <%= (isCreate ? "" : " disabled readonly") %> />
/>
<% if (isCreate) { %>

Select the contract type to load the available fields.

<% } else if (contract.contractFields.length === 0) { %>

The current contract type has no additional fields.

<% } else { %> <% let contractTypeFieldIds = ""; %> <% for (const contractField of contract.contractFields) { %> <% contractTypeFieldIds += "," + contractField.contractTypeFieldId; %>
<% if (contractField.fieldType === 'select' || (contractField.fieldValues ?? '') !== "") { %> <% const fieldValues = contractField.fieldValues.split("\n"); let valueFound = false; %>
<% } else { %> pattern="<%= contractField.pattern %>" <% } %> minlength="<%= contractField.minLength %>" maxlength="<%= contractField.maxLength %>" <%= contractField.isRequired ? " required" : "" %> /> <% } %>
<% } %> <% } %>

Funeral

Purchaser

<% if (isCreate) { %>

<%= (contract.isPreneed ? "Recipient" : "Deceased") %>

Any additional interments associated with this contract can be added after the contract is created.

<% } else { %>

<%= (contract.isPreneed ? "Recipient" : "Deceased") %>

<% } %>
<% if (!isCreate) { %>

Fees

Transactions

<% const workOrderOpenDateAlias = configFunctions.getConfigProperty("aliases.workOrderOpenDate"); const workOrderCloseDateAlias = configFunctions.getConfigProperty("aliases.workOrderCloseDate"); %>

Work Orders

<% if (contract.workOrders.length === 0) { %>

There are no work orders associated with this record.

<% } else { %> <% for (const workOrder of contract.workOrders) { %> <% } %>
Work Order Number Description Date
<%= workOrder.workOrderNumber %> <%= workOrder.workOrderType %>
<%= workOrder.workOrderDescription %>
<%= workOrder.workOrderOpenDateString %>
<% if (workOrder.workOrderCloseDate) { %> <%= workOrder.workOrderCloseDateString %> <% } else { %> (No <%= workOrderCloseDateAlias %>) <% } %>
<% } %>

Comments

<% } %> <%- include('_footerA'); -%> <% if (!isCreate) { %> <% } %> <%- include('_footerB'); -%>