<%if (sales.item != "" ) {%>
<%= sales.itemDescription %>
{Literal}Item{/Literal}
<%}%>
<%if (sales.group != "" ) { %>
<%= sales.group %>
<%
var byTypeOrCategory = "{Literal}Type{/Literal}";
if(sales.groupIsCategory)
byTypeOrCategory = "{Literal}Category{/Literal}";
%>
<%= byTypeOrCategory %>
<% }%>
<% if (sales.discount != 0) { %>
{Literal}Sale Type: Percent Discount{/Literal}
<% } %>
<% if (sales.quantity != 0) { %>
<% if (sales.forPrice != 0) { %>
{Literal}Sale Type: Item Quantity{/Literal}
<% } %>
<% } %>
<% if (sales.quantityLevel != 0) { %>
<% if (sales.quantityPrice != 0 && !sales.quantityPriceIsPct) { %>
{Literal}Sale Type: Quantity Price{/Literal}
<% } else if(sales.quantityPrice != 0 && sales.quantityPriceIsPct) { %>
{Literal}Sale Type: Quantity Percent Discount{/Literal}
<% } %>
<% } %>
<% if (sales.initialQuantity != 0) { %>
<% if (sales.nextDiscountPct != 0) { %>
{Literal}Sale Type: Quantity Price By Percent{/Literal}
<% } %>
<% } %>
<% if (sales.initialQuantity != 0) { %>
<% if (sales.nextDiscountPrice != 0) { %>
{Literal}Sale Type: Quantity Price By Price{/Literal}
<% } %>
<% } %>
<% var showStartDate = new Date(sales.start) %>
<% var showEndDate = new Date(sales.end) %>
<%= showStartDate.toLocaleDateString() %> - <%= showEndDate.toLocaleDateString()%>