app/views/reports_mailer/daily.html.haml in artfully_ose-1.2.0.pre.23 vs app/views/reports_mailer/daily.html.haml in artfully_ose-1.2.0.pre.24

- old
+ new

@@ -15,11 +15,11 @@ %h1 Daily Total: #{number_to_currency((@tix.total + @donations.total) / 100.0)} %h2 #{@tix.organization.name}: #{l @tix.start_date, :format => :date} -- if ! @tix.rows.empty? +- if !@tix.rows.empty? %h3 Tickets: #{number_to_currency(@tix.total / 100.0)} %table.tabular-data{:cellspacing => "0"} %tr %th.order Order %th.customer Customer @@ -34,14 +34,11 @@ %br %br = row.special_instructions %td.total= row.total -- else - %p There were no ticket orders placed. - -- if ! @tix.exchange_rows.empty? +- if !@tix.exchange_rows.empty? %h3 Exchanges %table.tabular-data{:cellspacing => "0"} %tr %th.order Order %th.customer Customer @@ -50,11 +47,11 @@ %tr %td.order-number= link_to row.id, order_url(id: row.id) %td= link_to row.person, person_url(id: row.person_id) %td= row.ticket_details -- if ! @donations.rows.empty? +- if !@donations.rows.empty? %h3 Donations: #{number_to_currency(@donations.total / 100.0)} %table.tabular-data{:cellspacing => "0"} %tr %th.order Order %th.customer Customer @@ -64,32 +61,27 @@ %tr %td.order-number= link_to row.id, order_url(id: row.id) %td= link_to row.person, person_url(id: row.person_id) %td %td.total= row.total -- elsif @tix.organization.has_kit?(:regular_donation) - %p There were no donations made. --if @tix.organization.can? :access, :passes - - if !@passes.rows.empty? - %h3 Passes: #{number_to_currency(@passes.total / 100.0)} - %table.tabular-data{:cellspacing => "0"} +- if !@passes.rows.empty? + %h3 Passes: #{number_to_currency(@passes.total / 100.0)} + %table.tabular-data{:cellspacing => "0"} + %tr + %th.order Order + %th.customer Customer + %th # + %th Pass + %th.total Total + - @passes.rows.each do |row| %tr - %th.order Order - %th.customer Customer - %th # - %th Pass - %th.total Total - - @passes.rows.each do |row| - %tr - %td.order-number= link_to row.id, order_url(id: row.id) - %td= link_to row.person, person_url(id: row.person_id) - %td=row.quantity - %td=row.pass_type - %td.total= row.total - - else - %p There were no passes purchased. + %td.order-number= link_to row.id, order_url(id: row.id) + %td= link_to row.person, person_url(id: row.person_id) + %td=row.quantity + %td=row.pass_type + %td.total= row.total - if !@memberships.rows.empty? %h3 Memberships: #{number_to_currency(@memberships.total / 100.0)} %table.tabular-data{:cellspacing => "0"} %tr @@ -103,24 +95,35 @@ %td.order-number= link_to row.id, order_url(id: row.id) %td= link_to row.person, person_url(id: row.person_id) %td=row.quantity %td=row.membership %td.total= row.total -- else - %p There were no memberships purchased. -- if @memberships.lapsed_memberships.any? - %h3 Membership Lapses - %table.tabular-data{:cellspacing => "0"} - %tr - %th.customer Customer - %th Membership - - @memberships.lapsed_memberships.each do |membership_lapse| + - if @memberships.lapsed_memberships.any? + %h3 Membership Lapses + %table.tabular-data{:cellspacing => "0"} %tr - %td.order-number= link_to membership_lapse.member.person, person_url(membership_lapse.member.person) - %td=membership_lapse.membership_type.name + %th.customer Customer + %th Membership + - @memberships.lapsed_memberships.each do |membership_lapse| + %tr + %td.order-number= link_to membership_lapse.member.person, person_url(membership_lapse.member.person) + %td=membership_lapse.membership_type.name + +- if @tix.rows.empty? + %p There were no ticket orders placed. + +- if @donations.rows.empty? && @tix.organization.has_kit?(:regular_donation) + %p There were no donations made. + +- if @passes.rows.empty? && @tix.organization.has_kit?(:passes) + %p There were no passes purchased. + +- if @memberships.rows.empty? && @tix.organization.has_kit?(:membership) + %p There were no memberships purchased. + - content_for :footer do = render :partial => "fine_print" %p To turn off this daily email report, - = link_to "edit your organization here.", edit_organization_url(@tix.organization) + = link_to "edit your organization here.", edit_organization_url(@tix.organization) \ No newline at end of file