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="[% interface %]/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 msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | format('%.2f') %]" );
20 var answer = confirm(msg);
22 event.preventDefault();
25 $('#CheckAll').click(function(){
26 $("#finest").checkCheckboxes();
27 enableCheckboxActions();
30 $('#CheckNone').click(function(){
31 $("#finest").unCheckCheckboxes();
32 enableCheckboxActions();
35 $(".cb").change(function(){
36 enableCheckboxActions();
38 enableCheckboxActions();
43 <body id="pat_pay" class="pat">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'patron-search.inc' %]
47 <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>
49 <div id="doc3" class="yui-t2">
54 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
56 <!-- The manual invoice and credit buttons -->
57 <div class="statictabs">
59 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
60 <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
61 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual invoice</a></li>
62 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual credit</a></li>
64 <div class="tabs-container">
67 <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
68 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
69 <p><span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></p>
74 <th>Fines & charges</th>
81 <th>Amount outstanding</th>
86 <td class="total" colspan="8">Total due:</td>
87 <td>[% total | format('%.2f') %]</td>
91 [% FOREACH account_grp IN accounts %]
92 [% FOREACH line IN account_grp.accountlines %]
95 [% IF ( line.amountoutstanding > 0 ) %]
96 <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
100 [% IF ( line.amountoutstanding > 0 ) %]
101 <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
102 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />[% END %]
104 <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
105 <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
106 <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
107 <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
108 <input type="hidden" name="accountlines_id[% line.accountno %]" value="[% line.accountlines_id %]" />
109 <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
110 <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
111 <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
112 <input type="hidden" name="notify_id[% line.accountno %]" value="[% line.notify_id %]" />
113 <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
114 <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
117 [% SWITCH line.accounttype %]
118 [% CASE 'Pay' %]Payment,thanks
119 [% CASE 'Pay00' %]Payment,thanks (cash via SIP2)
120 [% CASE 'Pay01' %]Payment,thanks (VISA via SIP2)
121 [% CASE 'Pay02' %]Payment,thanks (credit card via SIP2)
122 [% CASE 'N' %]New Card
124 [% CASE 'A' %]Account management fee
126 [% CASE 'L' %]Lost Item
127 [% CASE 'W' %]Writeoff
128 [% CASE %][% line.accounttype %]
130 [%- IF line.description %], [% line.description %][% END %]
131 [% IF line.title %]([% line.title |html_entity %])[% END %]
133 <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
134 <td>[% line.accounttype %]</td>
135 <td>[% line.notify_id %]</td>
136 <td>[% line.notify_level %]</td>
137 <td class="debit">[% line.amount | format('%.2f') %]</td>
138 <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td>
141 [% IF ( account_grp.total ) %]
144 <td class="total" colspan="8">Sub total:</td>
145 <td>[% account_grp.total | format('%.2f') %]</td>
151 <fieldset class="action">
152 <input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" />
153 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="woall" id="woall" value="Write off all" class="submit" />[% END %]
154 <input type="submit" id="payselected" name="payselected" value="Pay selected" class="submit" />
155 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
159 <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
167 [% INCLUDE 'circ-menu.tt' %]
170 [% INCLUDE 'intranet-bottom.inc' %]