<%== erb :'admin/_nav', layout: false %>

Dashboard

<% if @inv %>

Invoices

<%= @inv[:count] %>total
<%= @inv[:unpaid].size %>unpaid
<%= @inv[:overdue] %>overdue
<% if @inv[:unpaid_totals].any? %>

Outstanding: <%= @inv[:unpaid_totals].map { |cur, sum| "#{cur} #{'%.2f' % sum}" }.join(' · ') %>

<% end %> <% if @inv[:recent].any? %> <% @inv[:recent].each do |inv| %> <% end %>
<%= inv.number %> <%= inv.client_name %> <%= inv.currency %> <%= '%.2f' % inv.total %> <%= inv.status %>
<% end %>

<% if can?('invoices', 'write') %>+ New invoice · <% end %>all invoices

<% end %> <% if @bingo %>

Bingo

<%= @bingo[:hit] %>/<%= @bingo[:cells] %>crossed out
<%= @bingo[:lines] %>lines
<%= @bingo[:reserve] %>in reserve
<% if (last = @bingo[:last_incident]) %>

Latest: <%= last.occurred_on %> <%= Bingo::ICONS[last.kind] %> <%= last.datacenter.name_ru %> — <%= last.title_ru %>

<% end %> <% if @bingo[:no_photo].any? %>

No photo on the card: <%= @bingo[:no_photo].map(&:name_ru).join(', ') %>

<% end %>

manage<% if bingo_public_url %> · public card ↗<% end %>

<% end %> <% unless @inv || @bingo %>

No areas are assigned to your account yet. Ask an administrator for access.

<% end %>