<%- include('partials/head',{title:'Dashboard',subtitle:'All brands, invoices and payment activity in one place'}) %>
<div class="cards"><div class="card"><span>Total invoices</span><strong><%= stats.invoices %></strong></div><div class="card"><span>Paid</span><strong><%= stats.paid %></strong></div><div class="card"><span>Outstanding</span><strong><%= stats.pending %></strong></div><div class="card"><span>GBP collected</span><strong><%= money(stats.gbp,'GBP') %></strong></div><div class="card"><span>USD collected</span><strong><%= money(stats.usd,'USD') %></strong></div></div>
<div class="panel"><div class="panelhead"><h2>Recent invoices</h2><a class="primary sm" href="/invoices/new">Create invoice</a></div><div class="tablewrap"><table><thead><tr><th>Invoice</th><th>Brand</th><th>Customer</th><th>Total</th><th>Status</th></tr></thead><tbody><% recent.forEach(i=>{ %><tr><td><a href="/invoices/<%=i.id%>"><%=i.invoice_number%></a></td><td><%=i.brand_name%></td><td><%=i.customer_name||'—'%></td><td><%=money(i.total,i.currency)%></td><td><span class="status <%=i.status%>"><%=i.status%></span></td></tr><% }) %></tbody></table></div></div><%- include('partials/foot') %>
