fix missing quantity calculation
parent
37984ed2f3
commit
5eb925c2cd
|
|
@ -207,11 +207,11 @@
|
|||
<table class="is-10pt data-table">
|
||||
<tr>
|
||||
<td><%= configFunctions.getProperty("aliases.map") %></td>
|
||||
<td><%= lotOccupancy.mapName %></td>
|
||||
<td><%= lotOccupancy.mapName ?? '(No ' + configFunctions.getProperty("aliases.map") + ')' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= configFunctions.getProperty("aliases.lot") %></td>
|
||||
<td><%= lotOccupancy.lotName %></td>
|
||||
<td><%= lotOccupancy.lotName ?? '(No ' + configFunctions.getProperty("aliases.lot") + ')' %></td>
|
||||
</tr>
|
||||
<%
|
||||
for (const field of lotOccupancy.lotOccupancyFields) {
|
||||
|
|
@ -239,47 +239,54 @@
|
|||
<% for (const fee of lotOccupancy.lotOccupancyFees) { %>
|
||||
<% if (currentFeeCategory !== fee.feeCategory) { %>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<td colspan="3">
|
||||
<strong><%= fee.feeCategory %></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<% currentFeeCategory = fee.feeCategory; %>
|
||||
<% } %>
|
||||
<tr>
|
||||
<td>
|
||||
<td <% if (fee.quantity === 1) { %>colspan="2"<% } %>>
|
||||
<%= fee.feeName %>
|
||||
</td>
|
||||
<% if (fee.quantity !== 1) { %>
|
||||
<td class="has-text-right is-8pt has-text-nowrap">
|
||||
$<%= fee.feeAmount.toFixed(2) %>
|
||||
×
|
||||
<%= fee.quantity %>
|
||||
</td>
|
||||
<% } %>
|
||||
<td class="has-text-right">
|
||||
$<%= fee.feeAmount.toFixed(2) %>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
feeAmountTotal += fee.feeAmount;
|
||||
taxAmountTotal += fee.taxAmount;
|
||||
feeAmountTotal += fee.feeAmount * fee.quantity;
|
||||
taxAmountTotal += fee.taxAmount * fee.quantity;
|
||||
%>
|
||||
<% } %>
|
||||
<tr>
|
||||
<td><strong>Sub Total</strong></td>
|
||||
<td colspan="2"><strong>Sub Total</strong></td>
|
||||
<td class="has-text-right">
|
||||
<strong>$<%= feeAmountTotal.toFixed(2) %></strong>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td>HST</td>
|
||||
<td colspan="2">HST</td>
|
||||
<td class="has-text-right">
|
||||
$<%= taxAmountTotal.toFixed(2) %>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td><strong>Total Sale</strong></td>
|
||||
<td colspan="2"><strong>Total Sale</strong></td>
|
||||
<td class="has-text-right">
|
||||
<strong>$<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %></strong>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td><strong>Balance Owing</strong></td>
|
||||
<td colspan="2"><strong>Balance Owing</strong></td>
|
||||
<td class="has-text-right">
|
||||
<strong>$<%= (feeAmountTotal + taxAmountTotal - lotOccupancyFunctions.getTransactionTotal(lotOccupancy)).toFixed(2) %></strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue