5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Patrons › Collect fine payment for [% patron.firstname %] [% patron.surname %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="pat_paycollect" class="pat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]">Pay fines for [% patron.firstname %] [% patron.surname %]</a> › [% IF ( pay_individual ) %]Pay an individual fine[% ELSIF ( writeoff_individual ) %]Write off an individual fine[% ELSE %][% IF ( selected_accts ) %]Pay an amount toward selected fines[% ELSE %]Pay an amount toward all fines[% END %][% END %]</div>
15 <div id="doc3" class="yui-t2">
20 [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
23 <!-- The manual invoice and credit buttons -->
24 <div class="statictabs">
27 <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a>
30 <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a>
33 <a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a>
36 <a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a>
39 <div class="tabs-container">
40 [% IF ( error_over ) %]
41 <div id="error_message" class="dialog alert">
42 You must pay a value less than or equal to [% total_due | format('%.2f') %].
46 [% IF ( pay_individual ) %]
47 <form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl">
48 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
49 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
50 <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
51 <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
52 <input type="hidden" name="description" id="description" value="[% description %]" />
53 <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
54 <input type="hidden" name="amount" id="amount" value="[% amount %]" />
55 <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
56 <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
57 <input type="hidden" name="title" id="title" value="[% title %]" />
59 <fieldset class="rows">
60 <legend>Pay an individual fine</legend>
61 <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" />
67 <th>Amount outstanding</th>
70 <td colspan="3">Total amount payable:</td><td>[% amountoutstanding | format('%.2f') %]</td>
74 [% individual_description %]
76 <td>[% accounttype %]</td>
77 <td class="debit">[% amount | format('%.2f') %]</td>
78 <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
85 <label for="paid">Collect from patron: </label>
86 <!-- default to paying all -->
87 <input name="paid" id="paid" value="[% amountoutstanding %]" />
92 <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
93 <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></div>
95 [% ELSIF ( writeoff_individual ) %]
96 <form name="woindivfine" id="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
97 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
98 <fieldset class="rows">
99 <legend>Write off an individual fine</legend>
100 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
101 <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
102 <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
103 <input type="hidden" name="description" id="description" value="[% description %]" />
104 <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
105 <input type="hidden" name="amount" id="amount" value="[% amount %]" />
106 <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
107 <input type="hidden" name="title" id="title" value="[% title %]" />
108 <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" />
112 <th>Account type</th>
114 <th>Amount outstanding</th>
116 <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
118 <td>[% description %] [% title %]</td>
119 <td>[% accounttype %]</td>
120 <td class="debit">[% amount | format('%.2f') %]</td>
121 <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
127 <label for="paid">Writeoff amount: </label>
128 <!-- default to writing off all -->
129 <input name="amountwrittenoff" id="amountwrittenoff" value="[% amountoutstanding %]" />
133 <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
134 <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></div>
138 <form name="payfine" id="payfine" method="post" action="/cgi-bin/koha/members/paycollect.pl">
139 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
140 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
141 <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" />
142 <input type="hidden" name="total" id="total" value="[% total %]" />
144 <fieldset class="rows">
145 [% IF ( selected_accts ) %]<legend>Pay an amount toward selected fines</legend>[% ELSE %]<legend>Pay an amount toward all fines</legend>[% END %]
148 <span class="label">Total amount outstanding: </span>
149 <span class="debit">[% total | format('%.2f') %]</span>
152 <label for="paid">Collect from patron: </label>
153 <!-- default to paying all -->
154 <input name="paid" id="paid" value="[% total | format('%.2f') %]" />
157 <label for="selected_accts_notes">Note: </label>
158 <textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea>
162 <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
163 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></div>
171 [% INCLUDE 'circ-menu.inc' %]
175 [% MACRO jsinclude BLOCK %]
176 [% Asset.js("js/members-menu.js") %]
177 <script type= "text/javascript">
178 $(document).ready(function() {
179 $('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit();
180 $("#paid").on("change",function(){
185 function moneyFormat(textObj) {
186 var newValue = textObj.value;
192 for(i=0; i < newValue.length; i++) {
193 aChar = newValue.substring(i, i+1);
194 if (aChar >= "0" && aChar <= "9") {
196 decAmount = "" + decAmount + aChar;
199 dolAmount = "" + dolAmount + aChar;
211 if (dolAmount == "") {
215 if (dolAmount.length > 1) {
216 while(dolAmount.length > 1 && dolAmount.substring(0,1) == "0") {
217 dolAmount = dolAmount.substring(1,dolAmount.length);
220 if (decAmount.length > 2) {
221 decAmount = decAmount.substring(0,2);
224 if (decAmount.length == 1) {
225 decAmount = decAmount + "0";
227 if (decAmount.length == 0) {
228 decAmount = decAmount + "00";
231 textObj.value = dolAmount + "." + decAmount;
236 [% INCLUDE 'intranet-bottom.inc' %]