<% var last_item_id = 0; %>

<%= register.name %>

<%= lang.label_cashier %> : <%= session_user %>

<% if(typeof checkout_guide != undefined && checkout_guide.length > 5){%>
<%- checkout_guide %>
<% }else{ %>

<%= lang.label_products %>

<% if (items.length > 0) { %> <% items.forEach(function(item){ %> <% if(last_item_id < item.update_time){ %> <% last_item_id = item.update_time; %> <% } %> <% }); %> <% } %>
<%= lang.label_product %> <%= lang.label_price %> <%= lang.label_qty %> <%= lang.label_total %>

<%= item.name %>

<%- item.sub_name %>

<%= accounting.formatMoney(item.final_price_incl_tax,'') %> <%= item.qty %> <%= accounting.formatMoney(item.total_incl_tax,'') %>
<% } %>