Bug 6413 follow-up: fixing capital case & tabs
[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     $(document).ready(function(){
8  $('#pay-fines-form').preventDoubleFormSubmit();
9         $("#woall").click(function(event){
10             var answer = confirm(_("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!"));
11                 if (!answer){
12                     event.preventDefault();
13                 }
14         });
15         $('#CheckAll').click(function(){ $("#finest").checkCheckboxes(); return false;});
16         $('#CheckNone').click(function(){ $("#finest").unCheckCheckboxes(); return false;});
17     });
18 //]]>
19 </script>
20 </head>
21 <body id="pat_pay" class="pat">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'patron-search.inc' %]
24
25 <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>
26
27 <div id="doc3" class="yui-t2">
28    
29    <div id="bd">
30         <div id="yui-main">
31         <div class="yui-b">
32 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
33
34 <!-- The manual invoice and credit buttons -->
35 <div class="statictabs">
36 <ul>
37         <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
38     <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
39         <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual invoice</a></li>
40         <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual credit</a></li>
41 </ul>
42 <div class="tabs-container">
43
44 [% IF ( accounts ) %]
45     <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
46         <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
47 <p><span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></p>
48 <table id="finest">
49 <thead>
50 <tr>
51     <th>&nbsp;</th>
52     <th>Fines &amp; charges</th>
53     <th>Sel</th>
54     <th>Description</th>
55     <th>Payment note</th>
56     <th>Account type</th>
57     <th>Notify id</th>
58     <th>Level</th>
59     <th>Amount</th>
60     <th>Amount outstanding</th>
61 </tr>
62 </thead>
63 <tfoot>
64 <tr>
65     <td class="total" colspan="7">Total Due:</td>
66     <td>[% total | format('%.2f') %]</td>
67 </tr>
68 </tfoot>
69 <tbody>
70 [% FOREACH account_grp IN accounts %]
71     [% FOREACH line IN account_grp.accountlines %]
72 <tr>
73     <td>
74     [% IF ( line.amountoutstanding > 0 ) %]
75         <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
76     [% END %]
77     </td>
78     <td>
79     [% IF ( line.amountoutstanding > 0 ) %]
80         <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
81         <input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />
82     [% END %]
83     <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
84     <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
85     <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
86     <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
87     <input type="hidden" name="accountlines_id[% line.accountno %]" value="[% line.accountlines_id %]" />
88     <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
89     <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
90     <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
91     <input type="hidden" name="notify_id[% line.accountno %]" value="[% line.notify_id %]" />
92     <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
93     <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
94     </td>
95     <td>[% line.description %] ([% line.title |html_entity %])</td>
96     <td><input type="text" name="payment_note_[% line.accountno %]"></input></td>
97     <td>[% line.accounttype %]</td>
98     <td>[% line.notify_id %]</td>
99     <td>[% line.notify_level %]</td>
100     <td class="debit">[% line.amount | format('%.2f') %]</td>
101     <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td>
102 </tr>
103 [% END %]
104 [% IF ( account_grp.total ) %]
105 <tr>
106
107     <td class="total" colspan="7">Sub total:</td>
108     <td>[% account_grp.total | format('%.2f') %]</td>
109 </tr>
110 [% END %]
111 [% END %]
112 </tbody>
113 </table>
114 <fieldset class="action">
115 <input type="submit" name="paycollect"  value="Pay amount" class="submit" />
116 <input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />
117 <input type="submit" name="payselected"  value="Pay selected" class="submit" />
118 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
119 </fieldset>
120 </form>
121 [% ELSE %]
122     <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
123 [% END %]
124 </div></div>
125
126 </div>
127 </div>
128
129 <div class="yui-b">
130 [% INCLUDE 'circ-menu.tt' %]
131 </div>
132 </div>
133 [% INCLUDE 'intranet-bottom.inc' %]