<% logo = @invoice.site.logo.url(:thumb) logo = logo.gsub('//','https://') if !logo.nil? %>

Invoice

Your invoice number #<%= @invoice.invoice_number %> is ready for payment!

Click here to login to your account to update billing information.

<% if !@invoice.site.store_config.download_instructions.blank? %>

<%== @invoice.site.store_config.download_instructions %>

<% end %> <% if Colonnade::SuiteMenu.respond_to?(:to_s) %> <% sm = Colonnade::SuiteMenu.where(:invoice_id => @invoice.id).first game = sm.menu.game if sm && sm.menu %> <% if game %>

Game: <%= game.opponent %> on <%= game.date.strftime('%B %-d, %Y') %>

<% end %> <% end %> <% @invoice.line_items.each do |li| %> <% v = li.variant %> <% p = v.product %>

<% if li.is_gift %>

This item is a gift.

<% end %> <% end %> <% if @invoice.gift_wrap && @invoice.gift_wrap > 0 %> <% end %> <% if @invoice.discounts %> <% @invoice.discounts.each do |d| %> <% end %> <% end %> <% if @invoice.custom_discount %> <% end %>
Line Item Unit Price Quantity Subtotal

<%= p.title %>

<%= number_to_currency(li.unit_price) %> <%= li.quantity %> <%= number_to_currency(li.subtotal) %>
Subtotal: <%= number_to_currency(@invoice.subtotal) %>
Tax: <%= number_to_currency(@invoice.tax) %>
Shipping and Handling: <%= number_to_currency(@invoice.shipping + @invoice.handling) %>
Gift wrap: <%= number_to_currency(@invoice.gift_wrap) %>
"<%= d.gift_card.code %>" gift card: <%= number_to_currency(d.amount) %>
Discount: <%= number_to_currency(@invoice.custom_discount) %>
Total: <%= number_to_currency(@invoice.total) %>
<% if @invoice.shipping_address %> <% sa = @invoice.shipping_address %> <% if !sa.address1.blank? %>

Shipping Address

<%= sa.first_name %> <%= sa.last_name %>
<%= sa.address1 %>
<% if sa.address2 && sa.address2.strip.length > 0 %><%= sa.address2 %>
<% end %> <%= sa.city %>, <%= sa.state %> <%= sa.zip %>

<% end %> <% end %> <% if @invoice.billing_address %> <% ba = @invoice.billing_address %> <% if !ba.address1.blank? %>

Billing Address

<%= ba.first_name %> <%= ba.last_name %>
<%= ba.address1 %>
<% if ba.address2 && ba.address2.strip.length > 0 %><%= ba.address2 %>
<% end %> <%= ba.city %>, <%= ba.state %> <%= ba.zip %>

<% end %> <% end %>