show gp icons on view
parent
ebacfd0147
commit
93bb0a4f05
|
|
@ -301,122 +301,138 @@
|
|||
<% } %>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="panel">
|
||||
<h2 class="panel-heading">Fees</h2>
|
||||
<div class="panel-block is-block">
|
||||
<% if (lotOccupancy.lotOccupancyFees.length === 0) { %>
|
||||
<div class="message is-info">
|
||||
<p class="message-body">
|
||||
There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
||||
</p>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<%
|
||||
let feeAmountTotal = 0;
|
||||
let taxAmountTotal = 0;
|
||||
%>
|
||||
<table class="table is-fullwidth is-striped is-hoverable">
|
||||
<thead>
|
||||
<div class="column">
|
||||
<div class="panel">
|
||||
<h2 class="panel-heading">Fees</h2>
|
||||
<div class="panel-block is-block">
|
||||
<% if (lotOccupancy.lotOccupancyFees.length === 0) { %>
|
||||
<div class="message is-info">
|
||||
<p class="message-body">
|
||||
There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record.
|
||||
</p>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<%
|
||||
let feeAmountTotal = 0;
|
||||
let taxAmountTotal = 0;
|
||||
%>
|
||||
<table class="table is-fullwidth is-striped is-hoverable">
|
||||
<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>
|
||||
<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>
|
||||
<th colspan="5">Subtotal</th>
|
||||
<td class="has-text-right has-text-weight-bold">$<%= feeAmountTotal.toFixed(2) %></td>
|
||||
</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>
|
||||
<th>Date</th>
|
||||
<th><%= configFunctions.getProperty("aliases.externalReceiptNumber") %></th>
|
||||
<th class="has-text-right">Amount</th>
|
||||
<th colspan="5">Tax</th>
|
||||
<td class="has-text-right">$<%= taxAmountTotal.toFixed(2) %></td>
|
||||
</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 %><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>
|
||||
<% } %>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<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>
|
||||
|
||||
<%- include('_footerA'); -%>
|
||||
|
|
|
|||
Loading…
Reference in New Issue