1 <form method="post" action="opac-account-pay.pl" class="form-horizontal">
2 [% IF ( ACCOUNT_LINES ) %]
3 <table class="table table-bordered table-striped" id="finestable">
4 <caption>Your charges</caption>
7 [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %]
8 <th class="title-string">Date</th>
12 <th>Amount outstanding</th>
17 [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %]
18 [% IF ACCOUNT_LINE.amountoutstanding > 0 || ACCOUNT_LINE.amountoutstanding < 0 %]<tr class="outstanding">[% ELSE %]<tr>[% END%]
19 [% IF ENABLE_OPAC_PAYMENTS %]
21 [% IF ACCOUNT_LINE.amountoutstanding > 0 %]
22 [% SET DISPLAY_PAYMENT_BLOCK = 1 %]
23 <input class="checkbox-pay pay-online hidden" name="accountline" type="checkbox" id="checkbox-pay-[% ACCOUNT_LINE.accountlines_id | html %]" value="[% ACCOUNT_LINE.accountlines_id | html %]">
24 <input type="hidden" id="amount-[% ACCOUNT_LINE.accountlines_id | html %]" value="[% ACCOUNT_LINE.amountoutstanding | html %]" />
28 <td><span title="[% ACCOUNT_LINE.date | html %]">[% ACCOUNT_LINE.date | $KohaDates %]</span></td>
30 [% PROCESS account_type_description account=ACCOUNT_LINE %]
33 [%- IF ACCOUNT_LINE.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', ACCOUNT_LINE.payment_type, 1) | html %][% END %]
34 [%- IF ACCOUNT_LINE.description %][% ACCOUNT_LINE.description | html %][% END %]
35 [% IF ACCOUNT_LINE.itemnumber %]([% ACCOUNT_LINE.item.biblio.title | html %])[% END %]
37 [% IF ( ACCOUNT_LINE.is_credit ) %]<td class="credit">[% ACCOUNT_LINE.amount * -1 | $Price %][% ELSE %]<td class="debit">[% ACCOUNT_LINE.amount | $Price %][% END %]</td>
38 [% IF ( ACCOUNT_LINE.is_credit ) %]<td class="credit">[% ACCOUNT_LINE.amountoutstanding * -1 | $Price %][% ELSE %]<td class="debit">[% ACCOUNT_LINE.amountoutstanding | $Price %][% END %]</td>
45 [%- IF ENABLE_OPAC_PAYMENTS -%]
46 [%- SET COLSPAN = 5 -%]
48 [%- SET COLSPAN = 4 -%]
50 <th class="sum" colspan="[% COLSPAN | html %]">Total due</th>
51 <td class="sum">[% total | $Price %]</td>
53 [% IF outstanding_credits.total_outstanding < 0 %]
54 [% FOREACH outstanding_credit IN outstanding_credits %]
55 [% IF outstanding_credit.amountoutstanding < 0 %]<tr class="outstanding">[% ELSE %]<tr>[% END%]
56 [% IF ENABLE_OPAC_PAYMENTS %]<td></td>[% END %]
57 <td><span title="[% outstanding_credit.date | html %]">[% outstanding_credit.date | $KohaDates %]</span></td>
59 [% PROCESS account_type_description account=outstanding_credit %]
62 [%- IF outstanding_credit.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', outstanding_credit.payment_type, 1) | html %][% END %]
63 [%- IF outstanding_credit.description %][% outstanding_credit.description | html %][% END %]
64 [% IF outstanding_credit.itemnumber %]([% outstanding_credit.item.biblio.title | html %])[% END %]
66 <td class="credit">[% outstanding_credit.amount * -1 | $Price %]</td>
67 <td class="credit">[% outstanding_credit.amountoutstanding * -1 | $Price %]</td>
71 <th class="sum" colspan="[% COLSPAN | html %]">Total due if credit(s) applied:</th>
72 <td class="sum">[% total + outstanding_credits.total_outstanding | $Price %]</td>
81 <h3>You have no fines or charges</h3>
82 [% END # /IF ( ACCOUNT_LINES ) %]
84 [% FOREACH r IN relatives %]
85 <h3 id="g[% r.patron.id | html %]">[% r.patron.firstname | html %] [% r.patron.surname | html %]'s fines and charges</h3>
87 <table class="table table-bordered table-striped" id="finestable-[% r.id | html %]">
90 [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %]
91 <th class="title-string">Date</th>
94 <th>Amount outstanding</th>
99 [% SET account_sum = 0 %]
100 [% FOREACH a IN r.accountlines %]
101 [% SET account_sum = account_sum + a.amountoutstanding %]
103 [% IF ENABLE_OPAC_PAYMENTS %]
105 [% IF a.amountoutstanding > 0 %]
106 [% SET DISPLAY_PAYMENT_BLOCK = 1 %]
107 <input class="checkbox-pay pay-online hidden" name="accountline" type="checkbox" id="checkbox-pay-[% a.accountlines_id | html %]" value="[% a.accountlines_id | html %]">
108 <input type="hidden" id="amount-[% a.accountlines_id | html %]" value="[% a.amountoutstanding | html %]" />
112 <td><span title="[% a.date | html %]">[% a.date | $KohaDates %]</span></td>
114 [% PROCESS account_type_description account=a %]
115 [%- IF a.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', a.payment_type, 1) | html %][% END %]
116 [%- IF a.description %], [% a.description | html %][% END %]
117 [% IF a.itemnumber %]([% a.item.biblio.title | html %])[% END %]
119 [% IF ( a.amount < 0 ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% a.amount | $Price %]</td>
120 [% IF ( a.amountoutstanding < 0 ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% a.amountoutstanding | $Price %]</td>
127 <th class="sum" colspan="3">Total due</th>
128 <td class="sum">[% account_sum | $Price %]</td>
132 [% END # /FOREACH r %]
134 [% IF ENABLE_OPAC_PAYMENTS && DISPLAY_PAYMENT_BLOCK %]
135 <fieldset class="pay-online hidden">
136 <legend>Pay selected fines and charges</legend>
137 <span class="help-block"><h3>Payment method</h3></span>
139 [% IF Koha.Preference('EnablePayPalOpacPayments') %]
140 <div class="control-group">
141 <label class="radio">
142 <input type="radio" name="payment_method" id="payment_method-paypal" value="paypal" checked="checked" />
144 <a href="https://www.paypal.com/webapps/mpp/paypal-popup" title="How PayPal Works" class="paypal">
145 <img src="https://www.paypalobjects.com/webstatic/mktg/logo/AM_SbyPP_mc_vs_dc_ae.jpg" alt="PayPal Acceptance Mark" />
152 [% FOREACH p IN plugins %]
153 <div class="control-group">
154 <label class="radio">
155 <input type="radio" data-threshold="[% p.opac_online_payment_threshold | html %]" name="payment_method" id="payment_method-[% p.class | html %]" value="[% p.class | html %]" checked="checked" />
156 [% p.get_metadata.name | html %]
158 <small class="help-block text-muted"></small>
162 <div class="control-group">
163 <input type="hidden" id="payment-amount" name="payment_amount" value="0" />
164 <button id="submit-pay" type="submit" class="btn btn-primary" disabled="disabled">Make payment</button>
165 <span id="amount-to-pay-label">
166 Amount to pay: <span id="amount-to-pay">0.00</span>
170 [% END # /IF ENABLE_OPAC_PAYMENTS && DISPLAY_PAYMENT_BLOCK %]
173 [%- BLOCK account_type_description -%]
175 [%- IF account.credit_type_code -%]
176 [%- SWITCH account.credit_type_code -%]
177 [%- CASE 'PAYMENT' -%]Payment
178 [%- CASE 'WRITEOFF' -%]Writeoff
179 [%- CASE 'FORGIVEN' -%]Forgiven
180 [%- CASE 'CREDIT' -%]Credit
181 [%- CASE 'LOST_FOUND' -%]Lost item fee refund
182 [%- CASE 'REFUND' -%]Refund
183 [%- CASE -%][% account.credit_type.description | html %]
185 [%- ELSIF account.debit_type_code -%]
186 [%- SWITCH account.debit_type_code -%]
187 [%- CASE 'ACCOUNT' -%]Account creation fee
188 [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee
189 [%- CASE 'LOST' -%]Lost item
190 [%- CASE 'MANUAL' -%]Manual fee
191 [%- CASE 'NEW_CARD' -%]New card
192 [%- CASE 'OVERDUE' -%]Fine
193 [%- CASE 'PROCESSING' -%]Lost item processing fee
194 [%- CASE 'RENT' -%]Rental fee
195 [%- CASE 'RENT_DAILY' -%]Daily rental fee
196 [%- CASE 'RENT_RENEW' -%]Renewal of rental item
197 [%- CASE 'RENT_DAILY_RENEW' -%]Renewal of daily rental item
198 [%- CASE 'RESERVE' -%]Hold fee
199 [%- CASE 'RESERVE_EXPIRED' -%]Hold waiting too long
200 [%- CASE -%][% account.debit_type.description | html %]
203 [%- PROCESS account_status_description account=account -%]
205 [%- END # /BLOCK account_type_description -%]
207 [%- BLOCK account_status_description -%]
208 [%- SWITCH account.status -%]
209 [%- CASE 'UNRETURNED' -%]<span> (Accruing)</span>
210 [%- CASE 'RETURNED' -%]<span> (Returned)</span>
211 [%- CASE 'REPLACED' -%]<span> (Replaced)</span>
212 [%- CASE 'FORGIVEN' -%]<span> (Forgiven)</span>
213 [%- CASE 'VOID' -%]<span> (Voided)</span>
214 [%- CASE 'LOST' -%]<span> (Lost)</span>