%h1{style: "text-align: center"} Your tickets have been confirmed! %p{style: "text-align: center"} %strong{style: "font-size: 18px"}= @event.title %br #{effective_events_event_schedule(@event)} - if @event.rich_text_confirmation_email.present? %hr = @event.rich_text_confirmation_email.to_s.html_safe - if @event.delayed_payment? %hr %p{style: "margin-bottom: 4px; font-weight: bold;"} Please note: %ul{style: "margin-top: 0;"} %li Your credit card will be charged on #{@event.delayed_payment_date.strftime("%A, %B %d, %Y")}. %li Changes and cancellations must be made before this date. %li A receipt will be sent after the transaction is completed. %hr .effective-order %table.table{style: "margin-bottom: 20px;"} %thead %tr %th{style: "text-align: left;"} Qty %th{style: "text-align: left;"} Ticket %th{style: "text-align: right;"} Price %tbody - @order.order_items.each do |oi| %tr %td{style: "text-align: left;"}= oi.quantity %td{style: "text-align: left;"} = oi.to_s.html_safe = oi.purchasable.try(:responses) || oi.purchasable.try(:notes) %td.price= price_to_currency(oi.price) %tfoot %tr %td{colspan: 3}= " ".html_safe %tr %th.subtotal{colspan: 2} Subtotal %td.price.subtotal-price = price_to_currency(@order.subtotal) - if @order.tax_rate.blank? -# Nothing to do. We can't display Tax, Total or Credit Card Surcharge (which is taxed) yet. - elsif @order.tax_rate.present? && @order.surcharge_percent.to_f > 0.0 %tr %th.tax{colspan: 2} Tax (#{rate_to_percentage(@order.tax_rate)}) %td.price.tax-price = price_to_currency(@order.tax) %tr %th.amount-owing{colspan: 2} Amount owing before Credit Card Processing Fee %td.price.amount-owing-price = price_to_currency(@order.amount_owing) %tr %th.surcharge{colspan: 2} Credit Card Processing Fee (#{rate_to_percentage(@order.surcharge_percent)}) on #{price_to_currency(@order.amount_owing)} %td.price.surcharge-price = price_to_currency(@order.surcharge) %tr %th.surcharge-tax{colspan: 2} Tax (#{rate_to_percentage(@order.tax_rate)}) on Credit Card Processing Fee %td.price.surcharge-tax-price = price_to_currency(@order.surcharge_tax) %tr %th.total{colspan: 2} Total amount charged to credit card %td.price.total-price = price_to_currency(@order.total) - elsif @order.tax_rate.present? && !(@order.surcharge_percent.to_f > 0.0) %tr %th.tax{colspan: 2} Tax (#{rate_to_percentage(@order.tax_rate)}) %td.price.tax-price = price_to_currency(@order.tax) %tr %th.total{colspan: 2} Total %td.total-price = price_to_currency(@order.total) %hr %p{style: "text-align: center;"} - if @event.delayed_payment? && @order.delayed? && @order.deferred? = link_to('View or modify your registration', effective_events.event_event_registration_url(@event, @event_registration)) - else = link_to('View your registration', effective_events.event_event_registration_url(@event, @event_registration))