2 [% USE AuthorisedValues %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Patrons › Pay Fines for [% patron.firstname |html %] [% patron.surname |html %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="pat_pay" class="pat">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'patron-search.inc' %]
15 <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>
17 <div id="doc3" class="yui-t2">
22 [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
24 <!-- The manual invoice and credit buttons -->
25 <div class="statictabs">
27 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
28 <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
29 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
30 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
32 <div class="tabs-container">
35 <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
36 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
37 <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>
42 <th>Fines & charges</th>
47 <th>Amount outstanding</th>
52 <td class="total" colspan="6">Total due:</td>
53 <td style="text-align: right;">[% total | $Price %]</td>
57 [% FOREACH line IN accounts %]
60 [% IF ( line.amountoutstanding > 0 ) %]
61 <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id %]" />
65 [% IF ( line.amountoutstanding > 0 ) %]
66 <input type="submit" name="pay_indiv_[% line.accountlines_id %]" value="Pay" />
67 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountlines_id %]" value="Write off" />[% END %]
69 <input type="hidden" name="itemnumber[% line.accountlines_id %]" value="[% line.itemnumber %]" />
70 <input type="hidden" name="description[% line.accountlines_id %]" value="[% line.description %]" />
71 <input type="hidden" name="accounttype[% line.accountlines_id %]" value="[% line.accounttype %]" />
72 <input type="hidden" name="amount[% line.accountlines_id %]" value="[% line.amount %]" />
73 <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
74 <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
75 <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
78 [% SWITCH line.accounttype %]
79 [% CASE 'Pay' %]Payment, thanks
80 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
81 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
82 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
83 [% CASE 'N' %]New card
85 [% CASE 'A' %]Account management fee
87 [% CASE 'L' %]Lost item
88 [% CASE 'W' %]Writeoff
89 [% CASE 'FU' %]Accruing fine
90 [% CASE 'HE' %]Hold waiting too long
91 [% CASE 'Rent' %]Rental fee
92 [% CASE 'FOR' %]Forgiven
93 [% CASE 'LR' %]Lost item fee refund
94 [% CASE 'PF' %]Processing fee
95 [% CASE 'PAY' %]Payment
96 [% CASE 'WO' %]Writeoff
99 [% CASE %][% line.accounttype %]
101 [%- IF line.description %], [% line.description %][% END %]
102 [% IF line.title %]([% line.title %])[% END %]
104 <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
105 <td>[% line.accounttype %]</td>
106 <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
107 <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
110 [% IF ( account_grp.total ) %]
113 <td class="total" colspan="8" style="text-align: right;">Sub total:</td>
114 <td style="text-align: right;">[% account_grp.total | $Price %]</td>
119 <fieldset class="action">
120 <input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" />
121 [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="woall" id="woall" value="Write off all" class="submit" />[% END %]
122 <input type="submit" id="payselected" name="payselected" value="Pay selected" class="submit" />
123 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a>
127 <p>[% patron.firstname |html %] [% patron.surname |html %] has no outstanding fines.</p>
134 [% INCLUDE 'circ-menu.inc' %]
138 [% MACRO jsinclude BLOCK %]
139 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
140 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
141 <script type= "text/javascript">
142 function enableCheckboxActions(){
143 // Enable/disable controls if checkboxes are checked
144 var checkedBoxes = $("input.cb:checked");
145 if ($(checkedBoxes).size()) {
146 $("#payselected").prop("disabled",false);
148 $("#payselected").prop("disabled",true);
151 $(document).ready(function(){
152 $('#pay-fines-form').preventDoubleFormSubmit();
153 $("#woall").click(function(event){
154 var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | $Price %]" );
155 var answer = confirm(msg);
157 event.preventDefault();
160 $('#CheckAll').click(function(){
161 $("#finest").checkCheckboxes();
162 enableCheckboxActions();
165 $('#CheckNone').click(function(){
166 $("#finest").unCheckCheckboxes();
167 enableCheckboxActions();
170 $(".cb").change(function(){
171 enableCheckboxActions();
173 enableCheckboxActions();
179 [% INCLUDE 'intranet-bottom.inc' %]