2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
7 <script type= "text/javascript">
9 function enableCheckboxActions(){
10 // Enable/disable controls if checkboxes are checked
11 var checkedBoxes = $("input.cb:checked");
12 if ($(checkedBoxes).size()) {
13 $("#payselected").prop("disabled",false);
15 $("#payselected").prop("disabled",true);
18 $(document).ready(function(){
19 $('#pay-fines-form').preventDoubleFormSubmit();
20 $("#woall").click(function(event){
21 var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | format('%.2f') %]" );
22 var answer = confirm(msg);
24 event.preventDefault();
27 $('#CheckAll').click(function(){
28 $("#finest").checkCheckboxes();
29 enableCheckboxActions();
32 $('#CheckNone').click(function(){
33 $("#finest").unCheckCheckboxes();
34 enableCheckboxActions();
37 $(".cb").change(function(){
38 enableCheckboxActions();
40 enableCheckboxActions();
45 <body id="pat_pay" class="pat">
46 [% INCLUDE 'header.inc' %]
47 [% INCLUDE 'patron-search.inc' %]
49 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Pay fines for [% borrower.firstname %] [% borrower.surname %]</div>
51 <div id="doc3" class="yui-t2">
56 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
58 <!-- The manual invoice and credit buttons -->
59 <div class="statictabs">
61 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
62 <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
63 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual invoice</a></li>
64 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual credit</a></li>
66 <div class="tabs-container">
69 <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
70 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
71 <p><span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></p>
76 <th>Fines & charges</th>
83 <th>Amount outstanding</th>
88 <td class="total" colspan="8">Total due:</td>
89 <td style="text-align: right;">[% total | format('%.2f') %]</td>
93 [% FOREACH account_grp IN accounts %]
94 [% FOREACH line IN account_grp.accountlines %]
97 [% IF ( line.amountoutstanding > 0 ) %]
98 <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id %]" />
102 [% IF ( line.amountoutstanding > 0 ) %]
103 <input type="submit" name="pay_indiv_[% line.accountlines_id %]" value="Pay" />
104 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountlines_id %]" value="Write off" />[% END %]
106 <input type="hidden" name="itemnumber[% line.accountlines_id %]" value="[% line.itemnumber %]" />
107 <input type="hidden" name="description[% line.accountlines_id %]" value="[% line.description %]" />
108 <input type="hidden" name="accounttype[% line.accountlines_id %]" value="[% line.accounttype %]" />
109 <input type="hidden" name="amount[% line.accountlines_id %]" value="[% line.amount %]" />
110 <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
111 <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
112 <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
113 <input type="hidden" name="notify_id[% line.accountlines_id %]" value="[% line.notify_id %]" />
114 <input type="hidden" name="notify_level[% line.accountlines_id %]" value="[% line.notify_level %]" />
115 <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
118 [% SWITCH line.accounttype %]
119 [% CASE 'Pay' %]Payment, thanks
120 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
121 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
122 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
123 [% CASE 'N' %]New card
125 [% CASE 'A' %]Account management fee
127 [% CASE 'L' %]Lost item
128 [% CASE 'W' %]Writeoff
129 [% CASE 'FU' %]Accruing fine
130 [% CASE 'Rent' %]Rental fee
131 [% CASE 'FOR' %]Forgiven
132 [% CASE 'LR' %]Lost item fee refund
133 [% CASE 'PAY' %]Payment
134 [% CASE 'WO' %]Writeoff
136 [% CASE 'CR' %]Credit
137 [% CASE %][% line.accounttype %]
139 [%- IF line.description %], [% line.description %][% END %]
140 [% IF line.title %]([% line.title %])[% END %]
142 <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
143 <td>[% line.accounttype %]</td>
144 <td>[% line.notify_id %]</td>
145 <td>[% line.notify_level %]</td>
146 <td class="debit" style="text-align: right;">[% line.amount | format('%.2f') %]</td>
147 <td class="debit" style="text-align: right;">[% line.amountoutstanding | format('%.2f') %]</td>
150 [% IF ( account_grp.total ) %]
153 <td class="total" colspan="8" style="text-align: right;">Sub total:</td>
154 <td style="text-align: right;">[% account_grp.total | format('%.2f') %]</td>
160 <fieldset class="action">
161 <input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" />
162 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="woall" id="woall" value="Write off all" class="submit" />[% END %]
163 <input type="submit" id="payselected" name="payselected" value="Pay selected" class="submit" />
164 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
168 <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
175 [% INCLUDE 'circ-menu.inc' %]
178 [% INCLUDE 'intranet-bottom.inc' %]