~singpolyma/sgx-jmp

ref: c7c48663714307e3598dc14848e539fb8672b0b7 sgx-jmp/forms/plan_info.rb -rw-r--r-- 608 bytes
c7c48663Christopher Vollick Customer Info Forms and More Info 10 months ago
                                                                                
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
28
29
30
31
32
33
34
35
36
37
38
if @admin_info
	field(
		var: "plan",
		label: "Plan",
		value: @plan_info.plan.plan_name
	)
end

field(
	var: "renewal",
	label: "Renewal",
	value: @plan_info.monthly_price
)

field(
	var: "currency",
	label: "Currency",
	value: @plan_info.currency
)

field(
	var: "expires_at",
	label: @plan_info.plan.active? ? "Next renewal" : "Expired at",
	value: @plan_info.expires_at.strftime("%Y-%m-%d")
)

if @plan_info.auto_top_up_amount.positive?
	field(
		var: "auto_top_up_amount",
		label: "Auto Top-up",
		value: @plan_info.auto_top_up_amount.to_s
	)
else
	field(
		label: "Auto Top-up",
		value: "No"
	)
end