<% if (data.meta.user !== "") { %>

<%= gettext('Summary') %>

<% var total = 0; %> <% _.each(data.summary, function (row) { %> <% var subTotal = Math.round(row.amount) * row.rate; %> <% total += subTotal; %> <% }); %> <% _.each(data.paid_task_summary, function (row) { %> <% var subTotal = row.amount * row.rate; %> <% var amount = row.amount; if (row.type === paidTaskTypes.hourlyWork) { amount += ' ' + ngettext("hour", "hours", Math.round(row.amount)); } else if (row.type === paidTaskTypes.translation || row.type === paidTaskTypes.review) { amount += ' ' + ngettext("word", "words", Math.round(row.amount)); } %> <% total += subTotal; %> <% }); %>
<%= gettext('Period') %> <%= gettext('Action') %> <%= gettext('Amount') %> × <%= gettext('Rate') %> <%= gettext('Subtotal') %>
<%= PTL.reports.dateRangeString(row.start, row.end, false) %> <%= row.action %> <%= Math.round(row.amount) %> <%= ngettext("word", "words", Math.round(row.amount)) %> <%= row.rate %> <%= data.meta.user.currency %> <%= subTotal.toFixed(2) %> <%= data.meta.user.currency %>
<%= row.period %> <%= row.action %> <%= gettext("(registered tasks)") %> <%= amount %> <%= row.rate %> <%= data.meta.user.currency %> <%= subTotal.toFixed(2) %> <%= data.meta.user.currency %>
<%= interpolate(gettext('Total (%(currency)s)'), {'currency': data.meta.user.currency}, true) %> <%= total.toFixed(2) %> <%= data.meta.user.currency %>
<% } %>