diff --git a/views/lotOccupancy-view.ejs b/views/lotOccupancy-view.ejs index 9c5dbe22..6db5ecc9 100644 --- a/views/lotOccupancy-view.ejs +++ b/views/lotOccupancy-view.ejs @@ -301,122 +301,138 @@ <% } %>
-
-
-

Fees

-
- <% if (lotOccupancy.lotOccupancyFees.length === 0) { %> -
-

- There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record. -

-
- <% } else { %> - <% - let feeAmountTotal = 0; - let taxAmountTotal = 0; - %> - - +
+
+

Fees

+
+ <% if (lotOccupancy.lotOccupancyFees.length === 0) { %> +
+

+ There are no fees applied to this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record. +

+
+ <% } else { %> + <% + let feeAmountTotal = 0; + let taxAmountTotal = 0; + %> +
+ + + + + + + + + + + + <% for (const lotOccupancyFee of lotOccupancy.lotOccupancyFees) { %> + <% + feeAmountTotal += (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity); + taxAmountTotal += (lotOccupancyFee.taxAmount * lotOccupancyFee.quantity); + %> + + + <% if (lotOccupancyFee.quantity !== 1) { %> + + + + + <% } %> + + + <% } %> + + - - - - - - + + - - - <% for (const lotOccupancyFee of lotOccupancy.lotOccupancyFees) { %> - <% - feeAmountTotal += (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity); - taxAmountTotal += (lotOccupancyFee.taxAmount * lotOccupancyFee.quantity); - %> - - - <% if (lotOccupancyFee.quantity !== 1) { %> - - - - - <% } %> - - - <% } %> - - - - - - - - - - - - - - - -
FeeUnit Cost×Quantity=Total
"> + <%= lotOccupancyFee.feeName %>
+ <%= lotOccupancyFee.feeCategory %> +
$<%= lotOccupancyFee.feeAmount.toFixed(2) %>×<%= lotOccupancyFee.quantity %>=$<%= (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity).toFixed(2) %>
FeeUnit Cost×Quantity=TotalSubtotal$<%= feeAmountTotal.toFixed(2) %>
"> - <%= lotOccupancyFee.feeName %>
- <%= lotOccupancyFee.feeCategory %> -
$<%= lotOccupancyFee.feeAmount.toFixed(2) %>×<%= lotOccupancyFee.quantity %>=$<%= (lotOccupancyFee.feeAmount * lotOccupancyFee.quantity).toFixed(2) %>
Subtotal$<%= feeAmountTotal.toFixed(2) %>
Tax$<%= taxAmountTotal.toFixed(2) %>
Grand Total$<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %>
- <% } %> -
-
-
-
-
-

Transactions

-
- <% if (lotOccupancy.lotOccupancyTransactions.length === 0) { %> -
-

- There are no transactions associated with this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record. -

-
- <% } else { %> - - - - - + + - - - <% let transactionTotal = 0; %> - <% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %> - <% transactionTotal += lotOccupancyTransaction.transactionAmount; %> - - - - - - <% } %> - - - - - - - -
Date<%= configFunctions.getProperty("aliases.externalReceiptNumber") %>AmountTax$<%= taxAmountTotal.toFixed(2) %>
<%= lotOccupancyTransaction.transactionDateString %> - <% if (lotOccupancyTransaction.externalReceiptNumber !== '') { %> - <%= lotOccupancyTransaction.externalReceiptNumber %>
- <% } %> - <%= lotOccupancyTransaction.transactionNote %> -
- $<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %> -
Transaction Total - $<%= transactionTotal.toFixed(2) %> -
- <% } %> + + Grand Total + $<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %> + + + + <% } %> +
+
+
+
+
+

Transactions

+
+ <% if (lotOccupancy.lotOccupancyTransactions.length === 0) { %> +
+

+ There are no transactions associated with this <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> record. +

-
-
+ <% } else { %> + + + + + + + + + + <% let transactionTotal = 0; %> + <% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %> + <% transactionTotal += lotOccupancyTransaction.transactionAmount; %> + + + + + + <% } %> + + + + + + + +
Date<%= configFunctions.getProperty("aliases.externalReceiptNumber") %>Amount
<%= lotOccupancyTransaction.transactionDateString %> + <% if (lotOccupancyTransaction.externalReceiptNumber !== '') { %> + <%= lotOccupancyTransaction.externalReceiptNumber %> + <% if (configFunctions.getProperty('settings.dynamicsGP.integrationIsEnabled')) { %> + <% if (lotOccupancyTransaction.dynamicsGPDocument === undefined) { %> + + + + <% } else if (lotOccupancyTransaction.dynamicsGPDocument.documentTotal.toFixed(2) === lotOccupancyTransaction.transactionAmount.toFixed(2)) { %> + + + + <% } else { %> + + + + <% } %> + <% } %> +
+ <% } %> + <%= lotOccupancyTransaction.transactionNote %> +
+ $<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %> +
Transaction Total + $<%= transactionTotal.toFixed(2) %> +
+ <% } %> +
+
+ <%- include('_footerA'); -%>