- in_section :transactions - content_for :header do %h1 Ticket Orders #donations-search = form_tag sales_orders_path, :method => :get, :class => 'form-inline' do .control-group.well .pull-left = label_tag :start, "From", :class => "control-label" = text_field_tag :start,"#{l @search.start, :format => :date_for_input}", :class => 'datepicker input-small' = label_tag :stop, "To", :class => "control-label" = text_field_tag :stop, "#{l @search.stop, :format => :date_for_input}", :class => 'datepicker input-small' - if @events.present? = label_tag :event_id, nil, :class => "control-label" = raw select_event_for_sales_search @events, :event_id, params[:event_id] - if @event && @shows.present? = label_tag :show_id, nil, :class => "control-label" = raw select_show_for_sales_search @shows, :show_id, params[:show_id] .pull-right = submit_tag "Search", :class => "btn" = submit_tag "Download", :class => "btn" - if @search.results.present? #tickets %table.standalone.zebra.table %thead %tr %th Order %th Time %th Person %th Method %th Event and Show %th Amount %tbody - @search.results.each do |order| - order.items.select(&:ticket?).each_with_index do |item, index| %tr - if index == 0 - rowspan = order.items.select(&:ticket?).size %td{:rowspan => rowspan}= link_to order.id, order_path(order.id) %td{:rowspan => rowspan}= l(order.created_at_local_to_organization, :format => :short) %td{:rowspan => rowspan}= link_to_person(order.person) %td{:rowspan => rowspan}= (order.payment_method || "") %td ="#{item.show.event.name}" %br ="#{l item.show.datetime_local_to_event}" %td= number_as_cents item.price = will_paginate(@search.results) - else %h4= "No sales found."