3 [% SET ENABLE_OPAC_PAYMENTS = Koha.Preference('EnablePayPalOpacPayments') %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your fines and charges</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
10 <body id="opac-account" class="scrollto">
11 [% INCLUDE 'bodytag.inc' bodyid='opac-account' bodyclass='scrollto' %]
12 [% INCLUDE 'masthead.inc' %]
15 <ul class="breadcrumb">
16 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
17 <li>[% IF BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a>[% END %] <span class="divider">›</span></li>
18 <li><a href="#">Your fines and charges</a></li>
21 <div class="container-fluid">
22 <div class="row-fluid">
25 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
29 <div id="useraccount" class="maincontent">
32 <div class="alert alert-info">
33 [% IF message == 'valid_payment' %]
34 <p>Your payment of $[% message_value %] has been processed sucessfully!</p>
35 [% ELSIF message == 'duplicate_payment' %]
36 <p>A payment with the transaction id <i>[% message_value %]</i> has already been posted to an account.</p>
37 <p>Please contact a librarian for details.</p>
38 [% ELSIF message == 'invalid_payment' %]
39 <p>The transaction id <i>[% message_value %]</i> for this payment is invalid.</p>
40 <p>Please contact a librarian for details.</p>
45 <h3>Fines and charges</h3>
47 [% IF ( ACCOUNT_LINES ) %]
48 <form method="post" action="opac-account-pay.pl" class="form-horizontal">
49 <table class="table table-bordered table-striped">
52 [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %]
56 <th>Amount outstanding</th>
62 [%- IF ENABLE_OPAC_PAYMENTS -%]
63 [%- SET COLSPAN = 4 -%]
65 [%- SET COLSPAN = 3 -%]
67 <th class="sum" colspan="[% COLSPAN %]">Total due</th>
68 <td class="sum">[% total %]</td>
73 [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %]
74 [% IF ( ACCOUNT_LINE.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
75 [% IF ENABLE_OPAC_PAYMENTS %]
77 [% IF ACCOUNT_LINE.amountoutstanding > 0 %]
78 <input name="accountline" type="checkbox" class="checkbox-pay" id="checkbox-pay-[% ACCOUNT_LINE.accountlines_id %]" value="[% ACCOUNT_LINE.accountlines_id %]">
82 <td>[% ACCOUNT_LINE.date | $KohaDates %]</td>
84 [% SWITCH ACCOUNT_LINE.accounttype %]
85 [% CASE 'Pay' %]Payment, thanks
86 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
87 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
88 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
89 [% CASE 'N' %]New card
91 [% CASE 'A' %]Account management fee
93 [% CASE 'L' %]Lost item
94 [% CASE 'W' %]Writeoff
95 [% CASE 'FU' %]Accruing fine
96 [% CASE 'Rent' %]Rental fee
97 [% CASE 'FOR' %]Forgiven
98 [% CASE 'LR' %]Lost item fee refund
99 [% CASE 'PAY' %]Payment
100 [% CASE 'WO' %]Writeoff
102 [% CASE 'CR' %]Credit
103 [% CASE %][% ACCOUNT_LINE.accounttype %]
105 [%- IF ACCOUNT_LINE.description %], [% ACCOUNT_LINE.description %][% END %]
106 [% IF ACCOUNT_LINE.title %]([% ACCOUNT_LINE.title %])[% END %]
108 [% IF ( ACCOUNT_LINE.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amount %]</td>
109 [% IF ( ACCOUNT_LINE.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amountoutstanding %]</td>
116 [% IF ENABLE_OPAC_PAYMENTS %]
118 <legend>Pay selected fines and charges</legend>
119 <span class="help-block"><h3>Payment method</h3></span>
120 <div class="control-group">
121 <label class="radio">
122 <input type="radio" name="payment_method" id="payment_method-paypal" value="paypal" checked="checked">
123 <!-- PayPal Logo --><a href="https://www.paypal.com/webapps/mpp/paypal-popup" title="How PayPal Works" onclick="javascript:window.open('https://www.paypal.com/webapps/mpp/paypal-popup','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); return false;"><img src="https://www.paypalobjects.com/webstatic/mktg/logo/AM_SbyPP_mc_vs_dc_ae.jpg" border="0" alt="PayPal Acceptance Mark"></a><!-- PayPal Logo -->
126 <!-- look to the future
127 <div class="control-group">
128 <label class="radio">
129 <input type="radio" name="payment_method" id="payment_method-paypal" value="paypal" checked="checked">
135 <div class="control-group">
136 <input type="hidden" id="payment-amount" name="payment_amount" value="0" />
137 <button id="submit-pay" type="submit" class="btn" disabled="disabled">Make payment</button>
143 <h4>You have no fines or charges</h4>
145 </div> <!-- / #useraccount -->
146 </div> <!-- / .span10 -->
147 </div> <!-- / .row-fluid -->
148 </div> <!-- / .container-fluid -->
149 </div> <!-- / .main -->
151 [% INCLUDE 'opac-bottom.inc' %]
152 [% BLOCK jsinclude %]
153 <script type="text/javascript">
154 $( document ).ready(function() {
155 $('.checkbox-pay').change( function() {
156 $("#submit-pay").prop('disabled', ! $('.checkbox-pay:checked').length );