transaction total on occupancy view

deepsource-autofix-76c6eb20
Dan Gowans 2022-09-23 15:41:19 -04:00
parent 9d373d5f2c
commit 8d1fbf38e1
1 changed files with 10 additions and 0 deletions

View File

@ -275,7 +275,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% let transactionTotal = 0; %>
<% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %> <% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %>
<% transactionTotal += lotOccupancyTransaction.transactionAmount; %>
<tr> <tr>
<td><%= lotOccupancyTransaction.transactionDateString %></td> <td><%= lotOccupancyTransaction.transactionDateString %></td>
<td> <td>
@ -288,6 +290,14 @@
</tr> </tr>
<% } %> <% } %>
</tbody> </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> </table>
<% } %> <% } %>
</div> </div>