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