plan_info.rb

 1if @admin_info
 2	field(
 3		var: "plan",
 4		label: "Plan",
 5		value: @plan_info.plan.plan_name
 6	)
 7end
 8
 9field(
10	var: "renewal",
11	label: "Renewal",
12	value: @plan_info.monthly_price
13)
14
15field(
16	var: "currency",
17	label: "Currency",
18	value: @plan_info.currency
19)
20
21field(
22	var: "expires_at",
23	label: @plan_info.plan.active? ? "Next renewal" : "Expired at",
24	value: @plan_info.expires_at.strftime("%Y-%m-%d")
25)
26
27if @plan_info.auto_top_up_amount.positive?
28	field(
29		var: "auto_top_up_amount",
30		label: "Auto Top-up",
31		value: @plan_info.auto_top_up_amount.to_s
32	)
33else
34	field(
35		label: "Auto Top-up",
36		value: "No"
37	)
38end