Sha256: 93994c41d750327dc7e21edbff2a222dc0ebf907986d3b55da1e543a7cce5dc5

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

%h1.effective-heading
  = @plan.name
  Subscription
  details

%p= stripe_plan_description(@plan)

%table.table
  %tbody
    %tr
      %th Started
      %td= Time.zone.at(@stripe_subscription.start).strftime("%d-%b-%Y")
    - if @stripe_subscription.discount.present?
      %tr
        %th Coupon
        %td= stripe_coupon_description(@stripe_subscription.discount.coupon)
    %tr
      %th Status
      %td= @stripe_subscription.status
    %tr
      %th Current Period Start
      %td= Time.zone.at(@stripe_subscription.current_period_start).strftime("%d-%b-%Y")
    %tr
      %th Current Period End
      %td= Time.zone.at(@stripe_subscription.current_period_end).strftime("%d-%b-%Y")

%h2= "#{@plan.interval.chomp('ly')}ly Invoices"

%table.table
  %thead
    %tr
      %th Date
      %th Id
      %th Period
      %th Charge
  %tbody
    - @invoices.each do |invoice|
      %tr
        %td= Time.zone.at(invoice.date).strftime("%d-%b-%Y")
        %td= invoice.id
        %td
          = Time.zone.at(invoice.lines.first.period.start).strftime("%d-%b-%Y")
          to
          = Time.zone.at(invoice.lines.first.period.end).strftime("%d-%b-%Y")
        %td= price_to_currency(invoice.total)

%h2 Cancel Subscription

= link_to 'Unsubscribe', effective_orders.subscription_path(@plan.id), :data => {:method => :delete, :confirm => 'This will cancel your subscription. Are you sure? This cannot be undone.', :disable_with => 'Unsubscribing...'}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
effective_orders-2.2.4 app/views/effective/subscriptions/show.html.haml
effective_orders-2.2.3 app/views/effective/subscriptions/show.html.haml
effective_orders-2.2.2 app/views/effective/subscriptions/show.html.haml
effective_orders-2.2.1 app/views/effective/subscriptions/show.html.haml
effective_orders-2.2.0 app/views/effective/subscriptions/show.html.haml