Bill Activity

<% if(billingEndDate) { console.log(billingEndDate.split(' ')[0]); var nextDate = new Date(billingEndDate.split(' ')[0]); %>
Account cancelled. Your
content will be deleted on
<%} else { var nextDate = nextRecuringDate ? new Date(nextRecuringDate) : new Date(); %>
Automatic bill payment
Scheduled payment
<% } %>
<%=nextDate.getDate()%>
<%=nextDate.toLocaleString("en", { month: "long" })%>
<%=nextDate.getFullYear()%>
<% if(nextRecuringDate) { %> <%} else if(billingEndDate){%> <% } %>

Bill activities for the past 18 months

<% var activities = activities; activities && $.each(activities, function(index, activity){ var date = new Date(activity.date); var month = date.getMonth() + 1; var day = date.getDate(); var year = date.getFullYear(); var status = activity.activity; var amount = activity.amount ? '$'+parseFloat(activity.amount).toFixed(2) : ''; var desc = activity.description; %> <% }); %>
Date Amount Activity Description
<%=month%>/<%=day%>/<%=year%> <%=amount%> <%=status%> <%=desc%>