show gp icons on view
parent
ebacfd0147
commit
93bb0a4f05
|
|
@ -301,122 +301,138 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2 class="panel-heading">Fees</h2>
|
<h2 class="panel-heading">Fees</h2>
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<% if (lotOccupancy.lotOccupancyFees.length === 0) { %>
|
<% if (lotOccupancy.lotOccupancyFees.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">
|
<p class="message-body">
|
||||||
There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<%
|
<%
|
||||||
let feeAmountTotal = 0;
|
let feeAmountTotal = 0;
|
||||||
let taxAmountTotal = 0;
|
let taxAmountTotal = 0;
|
||||||
%>
|
%>
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Fee</th>
|
||||||
|
<th class="has-text-right"><span class="is-sr-only">Unit Cost</span></th>
|
||||||
|
<th class="has-width-1"><span class="is-sr-only">×</span></th>
|
||||||
|
<th class="has-width-1 has-text-right"><span class="is-sr-only">Quantity</span></th>
|
||||||
|
<th class="has-width-1"><span class="is-sr-only">=</span></th>
|
||||||
|
<th class="has-width-1 has-text-right">Total</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% for (const lotOccupancyFee of lotOccupancy.lotOccupancyFees) { %>
|
||||||
|
<%
|
||||||
|
feeAmountTotal += (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity);
|
||||||
|
taxAmountTotal += (lotOccupancyFee.taxAmount * lotOccupancyFee.quantity);
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="<%= (lotOccupancyFee.quantity === 1 ? "5" : "1") %>">
|
||||||
|
<%= lotOccupancyFee.feeName %><br />
|
||||||
|
<span class="tag"><%= lotOccupancyFee.feeCategory %></span>
|
||||||
|
</td>
|
||||||
|
<% if (lotOccupancyFee.quantity !== 1) { %>
|
||||||
|
<td class="has-text-right">$<%= lotOccupancyFee.feeAmount.toFixed(2) %></td>
|
||||||
|
<td>×</td>
|
||||||
|
<td class="has-text-right"><%= lotOccupancyFee.quantity %></td>
|
||||||
|
<td>=</td>
|
||||||
|
<% } %>
|
||||||
|
<td class="has-text-right">$<%= (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity).toFixed(2) %></td>
|
||||||
|
</tr>
|
||||||
|
<% } %>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Fee</th>
|
<th colspan="5">Subtotal</th>
|
||||||
<th class="has-text-right"><span class="is-sr-only">Unit Cost</span></th>
|
<td class="has-text-right has-text-weight-bold">$<%= feeAmountTotal.toFixed(2) %></td>
|
||||||
<th class="has-width-1"><span class="is-sr-only">×</span></th>
|
|
||||||
<th class="has-width-1 has-text-right"><span class="is-sr-only">Quantity</span></th>
|
|
||||||
<th class="has-width-1"><span class="is-sr-only">=</span></th>
|
|
||||||
<th class="has-width-1 has-text-right">Total</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<% for (const lotOccupancyFee of lotOccupancy.lotOccupancyFees) { %>
|
|
||||||
<%
|
|
||||||
feeAmountTotal += (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity);
|
|
||||||
taxAmountTotal += (lotOccupancyFee.taxAmount * lotOccupancyFee.quantity);
|
|
||||||
%>
|
|
||||||
<tr>
|
|
||||||
<td colspan="<%= (lotOccupancyFee.quantity === 1 ? "5" : "1") %>">
|
|
||||||
<%= lotOccupancyFee.feeName %><br />
|
|
||||||
<span class="tag"><%= lotOccupancyFee.feeCategory %></span>
|
|
||||||
</td>
|
|
||||||
<% if (lotOccupancyFee.quantity !== 1) { %>
|
|
||||||
<td class="has-text-right">$<%= lotOccupancyFee.feeAmount.toFixed(2) %></td>
|
|
||||||
<td>×</td>
|
|
||||||
<td class="has-text-right"><%= lotOccupancyFee.quantity %></td>
|
|
||||||
<td>=</td>
|
|
||||||
<% } %>
|
|
||||||
<td class="has-text-right">$<%= (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity).toFixed(2) %></td>
|
|
||||||
</tr>
|
|
||||||
<% } %>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<th colspan="5">Subtotal</th>
|
|
||||||
<td class="has-text-right has-text-weight-bold">$<%= feeAmountTotal.toFixed(2) %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="5">Tax</th>
|
|
||||||
<td class="has-text-right">$<%= taxAmountTotal.toFixed(2) %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="5">Grand Total</th>
|
|
||||||
<td class="has-text-right has-text-weight-bold">$<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %></td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<div class="panel">
|
|
||||||
<h2 class="panel-heading">Transactions</h2>
|
|
||||||
<div class="panel-block is-block">
|
|
||||||
<% if (lotOccupancy.lotOccupancyTransactions.length === 0) { %>
|
|
||||||
<div class="message is-info">
|
|
||||||
<p class="message-body">
|
|
||||||
There are no transactions associated with this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% } else { %>
|
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Date</th>
|
<th colspan="5">Tax</th>
|
||||||
<th><%= configFunctions.getProperty("aliases.externalReceiptNumber") %></th>
|
<td class="has-text-right">$<%= taxAmountTotal.toFixed(2) %></td>
|
||||||
<th class="has-text-right">Amount</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th colspan="5">Grand Total</th>
|
||||||
<% let transactionTotal = 0; %>
|
<td class="has-text-right has-text-weight-bold">$<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %></td>
|
||||||
<% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %>
|
</tr>
|
||||||
<% transactionTotal += lotOccupancyTransaction.transactionAmount; %>
|
</tfoot>
|
||||||
<tr>
|
</table>
|
||||||
<td><%= lotOccupancyTransaction.transactionDateString %></td>
|
<% } %>
|
||||||
<td>
|
</div>
|
||||||
<% if (lotOccupancyTransaction.externalReceiptNumber !== '') { %>
|
</div>
|
||||||
<%= lotOccupancyTransaction.externalReceiptNumber %><br />
|
</div>
|
||||||
<% } %>
|
<div class="column">
|
||||||
<small><%= lotOccupancyTransaction.transactionNote %></small>
|
<div class="panel">
|
||||||
</td>
|
<h2 class="panel-heading">Transactions</h2>
|
||||||
<td class="has-text-right">
|
<div class="panel-block is-block">
|
||||||
$<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %>
|
<% if (lotOccupancy.lotOccupancyTransactions.length === 0) { %>
|
||||||
</td>
|
<div class="message is-info">
|
||||||
</tr>
|
<p class="message-body">
|
||||||
<% } %>
|
There are no transactions associated with this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
||||||
</tbody>
|
</p>
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">Transaction Total</th>
|
|
||||||
<td class="has-text-weight-bold has-text-right">
|
|
||||||
$<%= transactionTotal.toFixed(2) %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% } else { %>
|
||||||
</div>
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Date</th>
|
||||||
|
<th><%= configFunctions.getProperty("aliases.externalReceiptNumber") %></th>
|
||||||
|
<th class="has-text-right">Amount</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% let transactionTotal = 0; %>
|
||||||
|
<% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %>
|
||||||
|
<% transactionTotal += lotOccupancyTransaction.transactionAmount; %>
|
||||||
|
<tr>
|
||||||
|
<td><%= lotOccupancyTransaction.transactionDateString %></td>
|
||||||
|
<td>
|
||||||
|
<% if (lotOccupancyTransaction.externalReceiptNumber !== '') { %>
|
||||||
|
<%= lotOccupancyTransaction.externalReceiptNumber %>
|
||||||
|
<% if (configFunctions.getProperty('settings.dynamicsGP.integrationIsEnabled')) { %>
|
||||||
|
<% if (lotOccupancyTransaction.dynamicsGPDocument === undefined) { %>
|
||||||
|
<span data-tooltip="No Matching Document Found">
|
||||||
|
<i class="fas fa-times-circle has-text-danger" aria-label="No Matching Document Found"></i>
|
||||||
|
</span>
|
||||||
|
<% } else if (lotOccupancyTransaction.dynamicsGPDocument.documentTotal.toFixed(2) === lotOccupancyTransaction.transactionAmount.toFixed(2)) { %>
|
||||||
|
<span data-tooltip="Matching Document Found">
|
||||||
|
<i class="fas fa-check-circle has-text-success" aria-label="Matching Document Found"></i>
|
||||||
|
</span>
|
||||||
|
<% } else { %>
|
||||||
|
<span data-tooltip="Matching Document: $<%= lotOccupancyTransaction.dynamicsGPDocument.documentTotal.toFixed(2) %>">
|
||||||
|
<i class="fas fa-exclamation-triangle has-text-warning" aria-label="Matching Document: $<%= lotOccupancyTransaction.dynamicsGPDocument.documentTotal.toFixed(2) %>"></i>
|
||||||
|
</span>
|
||||||
|
<% } %>
|
||||||
|
<% } %>
|
||||||
|
<br />
|
||||||
|
<% } %>
|
||||||
|
<small><%= lotOccupancyTransaction.transactionNote %></small>
|
||||||
|
</td>
|
||||||
|
<td class="has-text-right">
|
||||||
|
$<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% } %>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Transaction Total</th>
|
||||||
|
<td class="has-text-weight-bold has-text-right">
|
||||||
|
$<%= transactionTotal.toFixed(2) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%- include('_footerA'); -%>
|
<%- include('_footerA'); -%>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue