3 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Patrons › Pay Fines for [% patron.firstname |html %] [% patron.surname |html %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="pat_pay" class="pat">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'patron-search.inc' %]
16 <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 [% patron.firstname |html %] [% patron.surname |html %]</div>
18 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
25 <!-- The manual invoice and credit buttons -->
26 <div class="statictabs">
28 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
29 <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
30 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
31 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
33 <div class="tabs-container">
36 <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
37 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
38 <p><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></p>
43 <th>Fines & charges</th>
48 <th>Amount outstanding</th>
53 <td class="total" colspan="6">Total due:</td>
54 <td style="text-align: right;">[% total | $Price %]</td>
58 [% FOREACH line IN accounts %]
61 [% IF ( line.amountoutstanding > 0 ) %]
62 <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id %]" />
66 [% IF ( line.amountoutstanding > 0 ) %]
67 <input type="submit" name="pay_indiv_[% line.accountlines_id %]" value="Pay" />
68 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountlines_id %]" value="Write off" />[% END %]
70 <input type="hidden" name="itemnumber[% line.accountlines_id %]" value="[% line.itemnumber %]" />
71 <input type="hidden" name="description[% line.accountlines_id %]" value="[% line.description %]" />
72 <input type="hidden" name="accounttype[% line.accountlines_id %]" value="[% line.accounttype %]" />
73 <input type="hidden" name="amount[% line.accountlines_id %]" value="[% line.amount %]" />
74 <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
75 <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
76 <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
79 [% SWITCH line.accounttype %]
80 [% CASE 'Pay' %]Payment, thanks
81 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
82 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
83 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
84 [% CASE 'N' %]New card
86 [% CASE 'A' %]Account management fee
88 [% CASE 'L' %]Lost item
89 [% CASE 'W' %]Writeoff
90 [% CASE 'FU' %]Accruing fine
91 [% CASE 'HE' %]Hold waiting too long
92 [% CASE 'Rent' %]Rental fee
93 [% CASE 'FOR' %]Forgiven
94 [% CASE 'LR' %]Lost item fee refund
95 [% CASE 'PF' %]Processing fee
96 [% CASE 'PAY' %]Payment
97 [% CASE 'WO' %]Writeoff
100 [% CASE %][% line.accounttype %]
102 [%- IF line.description %], [% line.description %][% END %]
103 [% IF line.title %]([% line.title %])[% END %]
105 <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
106 <td>[% line.accounttype %]</td>
107 <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
108 <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
111 [% IF ( account_grp.total ) %]
114 <td class="total" colspan="8" style="text-align: right;">Sub total:</td>
115 <td style="text-align: right;">[% account_grp.total | $Price %]</td>
120 <fieldset class="action">
121 <input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" />
122 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="woall" id="woall" value="Write off all" class="submit" />[% END %]
123 <input type="submit" id="payselected" name="payselected" value="Pay selected" class="submit" />
124 <input type="submit" id="writeoff-selected" name="writeoff_selected" value="Write off selected" class="submit" />
125 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a>
129 <p>[% patron.firstname |html %] [% patron.surname |html %] has no outstanding fines.</p>
136 [% INCLUDE 'circ-menu.inc' %]
140 [% MACRO jsinclude BLOCK %]
141 [% Asset.js("js/members-menu.js") %]
142 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
143 <script type= "text/javascript">
144 function enableCheckboxActions(){
145 // Enable/disable controls if checkboxes are checked
146 var checkedBoxes = $("input.cb:checked");
147 if ($(checkedBoxes).size()) {
148 $("#payselected").prop("disabled",false);
150 $("#payselected").prop("disabled",true);
153 $(document).ready(function(){
154 $('#pay-fines-form').preventDoubleFormSubmit();
155 $("#woall").click(function(event){
156 var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | $Price %]" );
157 var answer = confirm(msg);
159 event.preventDefault();
162 $('#CheckAll').click(function(){
163 $("#finest").checkCheckboxes();
164 enableCheckboxActions();
167 $('#CheckNone').click(function(){
168 $("#finest").unCheckCheckboxes();
169 enableCheckboxActions();
172 $(".cb").change(function(){
173 enableCheckboxActions();
175 enableCheckboxActions();
181 [% INCLUDE 'intranet-bottom.inc' %]