-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepaid__electricity.tpl
115 lines (97 loc) · 3.79 KB
/
prepaid__electricity.tpl
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{include file="header.tpl" title="Prepaid Electricity" nav="prepaid"}
<div>
<h2 class="page-header">Prepaid Electricity</h2>
</div>
<div>
{include file="_partials/success.tpl"}
{include file="_partials/errors.tpl"}
<div class="row">
<div class="col-md-6">
<form method="post" class="form-horizontal" role="form">
<input name="utf8" type="hidden" value="✓" />
<input name="step" type="hidden" value="verify" />
{include file="_partials/csrf.tpl"}
<div class="form-group">
<label for="inputMeterNumber" class="col-sm-4 control-label">Prepaid Meter Number</label>
<div class="col-sm-8">
<input class="form-control" id="inputMeterNumber" type="text" name="meter_number" placeholder="Meter Number">
</div>
</div>
<div class="form-group">
<label for="inputAmount" class="col-sm-4 control-label">Amount</label>
<div class="col-sm-8">
<input class="form-control" id="inputAmount" type="text" name="amount" placeholder="Amount in Rands">
</div>
</div>
<div class="form-group">
<label for="inputSource" class="col-sm-4 control-label">Pay from account</label>
<div class="col-sm-8">
<select id="inputSource" class="form-control" name="source">
{foreach $accounts item=row}
{if $row.account_type eq 'wallet'}
<option value="{$row.uuid}"{if isset($smarty.post.source) && $smarty.post.source eq $row.uuid} selected{/if}>Diamond Wallet Account — {$row.account_number} (R {($row.balance/100)|string_format:"%.2f"})</option>
{else}
{* Other account types cannot purchase electricity at the moment. *}
{/if}
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button type="submit" class="btn btn-primary"{if $smarty.session.fica_status eq 0} disabled{/if}>Buy Now</button>
</div>
</div>
</div>
<div class="col-md-6">Supported municipalities and electricity utilties:
<ul>
<li>Breede Valley</li>
<li>Centlec (Bloemfontein)</li>
<li>City of Cape Town</li>
<li>George</li>
<li>Kimberly</li>
<li>Johannesburg (City Power)</li>
<li>Stellenbosch</li>
</ul>
<p>
Support for the following municipalities are coming online in the next few weeks:
</p>
<ul>
<li>Durban</li>
<li>Port Elizabeth</li>
<li>Pretoria (Tshwane)</li>
</ul>
</div>
</div>
<div class="alert alert-info" role="alert">
Please ensure you have entered the correct meter number as the municipalities do not allow reversals on vends of electricity.
</div>
{include file="_partials/fica_notice_transact.tpl"}
<h3>Recent Electricty Purchases</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Date</th>
<th>Reference</th>
<th>Meter Number</th>
<th>Amount</th>
<th> </th>
</tr>
</thead>
<tbody>
{foreach $transactions item=row}
<tr>
<td>{$row.date}</td>
<td>{$row.txn_id}</td>
<td>{$row.meter_number}</td>
<td>R {($row.amount/100)|string_format:"%.2f"}</td>
<td><a href="/prepaid/electricity/{$row.uuid}">View Receipt</a></td>
</tr>
{/foreach}
</tbody>
</table>
<p>
You can lookup the token for a transaction on your transaction view of your Diamond Wallet Account.
</p>
</div>
{include file="footer.tpl"}