-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeneficiaries.tpl
149 lines (136 loc) · 5.16 KB
/
beneficiaries.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{*
* List Beneficiaries and Standing Orders
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2014-2017 Jacques Marneweck. All rights strictly reserved.
*}
{include file="header.tpl" title="Beneficiaries Page" nav="beneficiaries"}
<div>
<h2 class="page-header">Beneficiaries</h2>
</div>
{include file="_partials/success.tpl"}
{include file="_partials/errors.tpl"}
<div>
<div class="pull-right">
<a class="btn btn-primary" href="/beneficiaries/add">Add Beneficiary</a>
</div>
<h3>My Beneficiaries</h3>
<form method="post" accept-charset="UTF-8">
{include file="_partials/utf8.tpl"}
{include file="_partials/csrf.tpl"}
<input type="hidden" name="step" value="verify" />
<input type="hidden" name="nonce" value="{$nonce|escape}" />
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Account Name</th>
<th>Your Reference</th>
<th>Their Reference</th>
<th>Amount</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{foreach $beneficiaries item=row}
<tr>
<td>{$row.name|escape} <div class="pull-right">{$row.account_number}</td></td>
<td><input type="hidden" name="beneficiary[]" value="{$row.id}" /><input type="text" name="reference1[]" value="{$row.reference1|escape}"></td>
<td><input type="text" name="reference2[]" value="{$row.reference2|escape}"></td>
<td><input type="text" name="amount[]" value="0.00"></td>
<td><a href="#">Payment History</a> • <a href="/beneficiaries/{$row.id}" data-method="DELETE" rel="nofollow" data-confirm="Are you sure you want to delete this beneficiary?">Delete</a></td>
</tr>
{foreachelse}
<tr>
<td colspan="5">You presently do not have any beneficiaries defined. <a href="/beneficiaries/add">Create your first beneficiary</a>.</td>
</tr>
{/foreach}
{if sizeof($beneficiaries) > 0}
<tr>
<td> </td>
<td>{if $smarty.session.fica_status ne 0}Pay from account:{/if}</td>
<td colspan="2">
{if $smarty.session.fica_status ne 0}
<select 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 Account — {$row.account_number} (R {($row.balance/100)|string_format:"%.2f"})</option>
{else}
<option value="{$row.uuid}"{if isset($smarty.post.source) && $smarty.post.source eq $row.uuid} selected{/if}>Diamond Pre-paid Debit Card — {$row.masked_cardnumber}</option>
{/if}
{/foreach}
{foreach $business_accounts item=row}
<option value="{$row.uuid}"{if isset($smarty.post.source) && $smarty.post.source eq $row.uuid} selected{/if}>Diamond Business Account — {$row.account_number} (R {($row.balance/100)|string_format:"%.2f"})</option>
{/foreach}
</select>
{/if}
</td>
<td>
{if $smarty.session.fica_status ne 0}
<input data-disable-with="Processing ..." type="submit" class="btn btn-primary" value="Pay Beneficiaries" />
{/if}
</td>
</tr>
{/if}
</tbody>
</table>
{if $smarty.session.fica_status ne 0}
{else}
{include file="_partials/fica_notice_transact.tpl"}
{/if}
</form>
<h4>Last 10 Payments (off us)</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Beneficiary Name</th>
<th>Amount Paid</th>
<th>Instruction Received</th>
</tr>
</thead>
<tbody>
{foreach $previouspayments item=row}
<tr>
<td>{$row.name}</td>
<td>ZAR {($row.amount/100)|string_format:"%0.2f"}</td>
<td>{$row.queued_at|datetz}</td>
<td><a class="btn btn-primary" href="/beneficiaries/proofofpayment/{$row.txn_ref}"><i class="fa fa-fw fa-download"></i> Download Proof of Payment</a><td>
</tr>
{/foreach}
</tbody>
</table>
<p> </p>
<p> </p>
<div class="pull-right">
<a class="btn btn-primary" href="/stoporders/add">Add Standing Order</a>
</div>
<h3>My Standing Orders</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Beneficiary Name</th>
<th>Your Reference</th>
<th>Their Reference</th>
<th>Amount</th>
<th>Next Due</th>
<th>Actions</th>
</th>
</thead>
<tbody>
{foreach $stoporders item=row}
<tr>
<td>{$row.name|escape}</td>
<td>{$row.reference1|escape}</td>
<td>{$row.reference2|escape}</td>
<td>R {($row.amount/100)|string_format:"%.2f"}</td>
<td>{$row.next_due}</td>
<td><a href="/stoporders/X/modify">Modify</a> • <a href="#">Cancel</a></td>
</tr>
{/foreach}
</tbody>
</table>
<p class="clearfix"> </td>
</div>
{include file="footer.tpl"}