1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5 <script type= "text/javascript">
7 function enableCheckboxActions(){
8 // Enable/disable controls if checkboxes are checked
9 var checkedBoxes = $("input.cb:checked");
10 if ($(checkedBoxes).size()) {
11 $("#payselected").prop("disabled",false);
13 $("#payselected").prop("disabled",true);
16 $(document).ready(function(){
17 $('#pay-fines-form').preventDoubleFormSubmit();
18 $("#woall").click(function(event){
19 var answer = confirm(_("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!"));
21 event.preventDefault();
24 $('#CheckAll').click(function(){
25 $("#finest").checkCheckboxes();
26 enableCheckboxActions();
29 $('#CheckNone').click(function(){
30 $("#finest").unCheckCheckboxes();
31 enableCheckboxActions();
34 $(".cb").change(function(){
35 enableCheckboxActions();
37 enableCheckboxActions();
42 <body id="pat_pay" class="pat">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'patron-search.inc' %]
46 <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>
48 <div id="doc3" class="yui-t2">
53 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
55 <!-- The manual invoice and credit buttons -->
56 <div class="statictabs">
58 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
59 <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
60 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual invoice</a></li>
61 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual credit</a></li>
63 <div class="tabs-container">
66 <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
67 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
68 <p><span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></p>
73 <th>Fines & charges</th>
80 <th>Amount outstanding</th>
85 <td class="total" colspan="8">Total Due:</td>
86 <td>[% total | format('%.2f') %]</td>
90 [% FOREACH account_grp IN accounts %]
91 [% FOREACH line IN account_grp.accountlines %]
94 [% IF ( line.amountoutstanding > 0 ) %]
95 <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
99 [% IF ( line.amountoutstanding > 0 ) %]
100 <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
101 <input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />
103 <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
104 <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
105 <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
106 <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
107 <input type="hidden" name="accountlines_id[% line.accountno %]" value="[% line.accountlines_id %]" />
108 <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
109 <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
110 <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
111 <input type="hidden" name="notify_id[% line.accountno %]" value="[% line.notify_id %]" />
112 <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
113 <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
116 [% SWITCH line.accounttype %]
117 [% CASE 'Pay' %]Payment,thanks
118 [% CASE 'N' %]New Card
120 [% CASE 'A' %]Account management fee
122 [% CASE 'L' %]Lost Item
123 [% CASE 'W' %]Writeoff
124 [% CASE %][% line.accounttype %]
126 [%- IF line.description %], [% line.description %][% END %]
127 [% IF line.title %]([% line.title |html_entity %])[% END %]
129 <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
130 <td>[% line.accounttype %]</td>
131 <td>[% line.notify_id %]</td>
132 <td>[% line.notify_level %]</td>
133 <td class="debit">[% line.amount | format('%.2f') %]</td>
134 <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td>
137 [% IF ( account_grp.total ) %]
140 <td class="total" colspan="8">Sub total:</td>
141 <td>[% account_grp.total | format('%.2f') %]</td>
147 <fieldset class="action">
148 <input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" />
149 <input type="submit" name="woall" id="woall" value="Write off all" class="submit" />
150 <input type="submit" id="payselected" name="payselected" value="Pay selected" class="submit" />
151 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
155 <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
163 [% INCLUDE 'circ-menu.tt' %]
166 [% INCLUDE 'intranet-bottom.inc' %]