Bug 2546: make description of standard fine types translatable
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / pay.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Patrons &rsaquo; 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">
6 //<![CDATA[
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);
12     } else {
13       $("#payselected").prop("disabled",true);
14     }
15 }
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!"));
20                 if (!answer){
21                     event.preventDefault();
22                 }
23         });
24         $('#CheckAll').click(function(){
25             $("#finest").checkCheckboxes();
26             enableCheckboxActions();
27             return false;
28         });
29         $('#CheckNone').click(function(){
30             $("#finest").unCheckCheckboxes();
31             enableCheckboxActions();
32             return false;
33         });
34         $(".cb").change(function(){
35             enableCheckboxActions();
36         });
37         enableCheckboxActions();
38     });
39 //]]>
40 </script>
41 </head>
42 <body id="pat_pay" class="pat">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'patron-search.inc' %]
45
46 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Pay fines for [% borrower.firstname %] [% borrower.surname %]</div>
47
48 <div id="doc3" class="yui-t2">
49    
50    <div id="bd">
51         <div id="yui-main">
52         <div class="yui-b">
53 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
54
55 <!-- The manual invoice and credit buttons -->
56 <div class="statictabs">
57 <ul>
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>
62 </ul>
63 <div class="tabs-container">
64
65 [% IF ( accounts ) %]
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>
69 <table id="finest">
70 <thead>
71 <tr>
72     <th>&nbsp;</th>
73     <th>Fines &amp; charges</th>
74     <th>Description</th>
75     <th>Payment note</th>
76     <th>Account type</th>
77     <th>Notify id</th>
78     <th>Level</th>
79     <th>Amount</th>
80     <th>Amount outstanding</th>
81 </tr>
82 </thead>
83 <tfoot>
84 <tr>
85     <td class="total" colspan="8">Total Due:</td>
86     <td>[% total | format('%.2f') %]</td>
87 </tr>
88 </tfoot>
89 <tbody>
90 [% FOREACH account_grp IN accounts %]
91     [% FOREACH line IN account_grp.accountlines %]
92 <tr>
93     <td>
94     [% IF ( line.amountoutstanding > 0 ) %]
95         <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
96     [% END %]
97     </td>
98     <td>
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" />
102     [% END %]
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 %]" />
114     </td>
115     <td>
116         [% SWITCH line.accounttype %]
117           [% CASE 'Pay' %]Payment,thanks
118           [% CASE 'N' %]New Card
119           [% CASE 'F' %]Fine
120           [% CASE 'A' %]Account management fee
121           [% CASE 'M' %]Sundry
122           [% CASE 'L' %]Lost Item
123           [% CASE 'W' %]Writeoff
124           [% CASE %][% line.accounttype %]
125         [%- END -%]
126         [%- IF line.description %], [% line.description %][% END %]
127         [% IF line.title %]([% line.title |html_entity %])[% END %]
128     </td>
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>
135 </tr>
136 [% END %]
137 [% IF ( account_grp.total ) %]
138 <tr>
139
140     <td class="total" colspan="8">Sub total:</td>
141     <td>[% account_grp.total | format('%.2f') %]</td>
142 </tr>
143 [% END %]
144 [% END %]
145 </tbody>
146 </table>
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>
152 </fieldset>
153 </form>
154 [% ELSE %]
155     <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
156 [% END %]
157 </div></div>
158
159 </div>
160 </div>
161
162 <div class="yui-b">
163 [% INCLUDE 'circ-menu.tt' %]
164 </div>
165 </div>
166 [% INCLUDE 'intranet-bottom.inc' %]