<% if @edituser %> <%= render :partial => 'caboose/users/admin_header' %> <% else %>
Admin > Invoices

Invoices

<% end %>

Show/hide search form New Manual Invoice Print Pending Invoices Summary Report

<% if @invoices.count > 0 %> <%= raw @pager.sortable_table_headings({ 'id' => 'ID', 'invoice_number' => 'Invoice Number', 'customer_id' => 'Customer', 'date_created' => 'Date Created', 'total' => 'Total', 'status' => 'Status' }) %> <% @invoices.each do |invoice| %> /invoices/<%= invoice.id %>';"> <% end %>
<%= raw invoice.id %> <%= raw invoice.invoice_number %> <% if invoice.customer.nil? %> Unknown <% else %> <% if invoice.customer.first_name && invoice.customer.first_name.strip.length > 0 %> <%= invoice.customer.first_name %> <%= invoice.customer.last_name %> <% else %> <%= invoice.customer.email %> <% end %> <% end %> <%= raw invoice.date_created %> <%= number_to_currency(invoice.total) %> <%= raw invoice.status %>

<%= raw @pager.generate %>

<% else %>

There are no invoices right now.

<% end %> <% if @edituser %> <%= render :partial => 'caboose/users/admin_footer' %> <% end %> <% content_for :caboose_css do %> <% end %> <% content_for :caboose_js do %> <% end %>