Sha256: 2df058716fe7d85a81704c80a7a8a01550d6afb62b8dbccf147ab589cbe9ec8f
Contents?: true
Size: 1.82 KB
Versions: 6
Compression:
Stored size: 1.82 KB
Contents
<h1>Receipt</h1> <p><%= number_to_currency(@receipt.amount.to_f / 100.0) %> at <%= Tang.company_name %></p> <hr> <p class="clearfix"> <span class="float-xs-left"><%= @receipt.card_brand %> <%= @receipt.card_last4 %></span> <span class="float-xs-right"><%= @receipt.created_at.strftime('%B %d, %Y') %></span> </p> <table class="table"> <thead> <tr> <th>Description</th> <th>Period</th> <th>Amount</th> </tr> </thead> <tbody> <% @receipt.invoice.invoice_items.each do |invoice_item| %> <tr> <% if invoice_item.description.present? %> <td><%= invoice_item.description %></td> <% else %> <td>Subscription to <%= invoice_item.plan.name %></td> <% end %> <td><%= invoice_item.period_start.strftime('%B %d, %Y') %> to <%= invoice_item.period_end.strftime('%B %d, %Y') %></td> <td><%= number_to_currency(invoice_item.amount.to_f / 100.0) %></td> </tr> <% end %> </tbody> <tfoot> <% if @receipt.invoice.coupon.present? %> <tr> <th>Subtotal</th> <td> </td> <td><%= number_to_currency(@receipt.invoice.subtotal.to_f / 100.0) %></td> </tr> <tr> <th>Coupons</th> <td> </td> <td><%= number_to_currency(@receipt.invoice.coupon.discount(@receipt.invoice.subtotal.to_f) / 100.0) %></td> </tr> <tr> <th> </th> <td> </td> <td><%= "#{@receipt.invoice.coupon.stripe_id} (#{coupon_off(@receipt.invoice.coupon)})" %></td> </tr> <% end %> <tr> <th>Total</th> <td> </td> <td><%= number_to_currency(@receipt.invoice.total.to_f / 100.0) %></td> </tr> <tr> <th>Paid</th> <th> </th> <th><%= number_to_currency(@receipt.amount.to_f / 100.0) %></th> </tr> </tfoot> </table>
Version data entries
6 entries across 6 versions & 1 rubygems