summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions/_subscription_details.html.haml
blob: e6cf87d4f10a7a61b44508177cc2a8b0c87ac72e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/needed?
%p
  - if local_assigns[:show_user]
    User:
    - user_to_show = user_for_subscription(subscription)
    = link_to user_to_show.login, user_overview_path(user_to_show)
  ID:
  = link_to subscription.id, user_subscription_path(@user, subscription.id)
  Balance:
  - color = (subscription.balance > 0) ? "red" : ""
  %font{:color => color}
    = number_to_currency(subscription.balance)
  Bill on:
  = subscription.billing_day_of_month
  Start date:
  = subscription.first_billing_date
  Paid through:
  = subscription.paid_through_date
  Plan:
  = subscription.plan_id
  Price:
  = number_to_currency(subscription.price)
  - color = (subscription.status == 'Active') ? "green" : "red"
  Status:
  %font{:color => color}
    = subscription.status
  - # would be good to get plan name but not sure if that is possible?