Bug 7472 Edit button ineffective when paying borrower fee
[koha-equinox.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 </head>
5 <body>
6 [% INCLUDE 'header.inc' %]
7 [% INCLUDE 'patron-search.inc' %]
8
9 <script type=text/javascript>
10
11 function confirmWriteoffAll() {
12     return confirm(_("Are you sure you want to writeoff all fines?"));
13 }
14
15 </script>
16
17 <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>
18
19 <div id="doc3" class="yui-t2">
20    
21    <div id="bd">
22         <div id="yui-main">
23         <div class="yui-b">
24 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
25
26 <!-- The manual invoice and credit buttons -->
27 <div class="toptabs">
28 <ul class="ui-tabs-nav">
29         <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
30         <li class="ui-tabs-selected"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
31         <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create Manual Invoice</a></li>
32         <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create Manual Credit</a></li>
33 </ul>
34 <div class="tabs-container">
35
36 [% IF ( accounts ) %]
37     <form action="/cgi-bin/koha/members/pay.pl" method="post">
38         <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
39
40 <table>
41 <tr>
42         <th>Fines &amp; Charges</th>
43     <th>Sel</th>
44         <th>Description</th>
45         <th>Account Type</th>
46         <th>Notify id</th>
47         <th>Level</th>
48         <th>Amount</th>
49         <th>Amount Outstanding</th>
50 </tr>
51
52 [% FOREACH account_grp IN accounts %]
53     [% FOREACH line IN account_grp.accountlines %]
54 <tr>
55     <td>
56     [% IF ( line.amountoutstanding > 0 ) %]
57         <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
58         <input type="submit" name="wo_indiv_[% line.accountno %]" value="Writeoff" />
59     [% END %]
60     <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
61     <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
62     <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
63     <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
64     <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
65     <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
66     <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
67     <input type="hidden" name="notify_id[% line.accountno %]" value="[% line.notify_id %]" />
68     <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
69     <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
70     </td>
71     <td>
72     [% IF ( line.amountoutstanding > 0 ) %]
73         <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
74     [% END %]
75     </td>
76     <td>[% line.description %] [% line.title |html_entity %]</td>
77     <td>[% line.accounttype %]</td>
78     <td>[% line.notify_id %]</td>
79     <td>[% line.notify_level %]</td>
80     <td class="debit">[% line.amount | format('%.2f') %]</td>
81     <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td>
82 </tr>
83 [% END %]
84 [% IF ( account_grp.total ) %]
85 <tr>
86
87     <td class="total" colspan="7">Sub Total:</td>
88     <td>[% account_grp.total | format('%.2f') %]</td>
89 </tr>
90 [% END %]
91 [% END %]
92 <tr>
93     <td class="total" colspan="7">Total Due:</td>
94     <td>[% total | format('%.2f') %]</td>
95 </tr>
96 </table>
97 <fieldset class="action">
98 <input type="submit" name="paycollect"  value="Pay Amount" class="submit" />
99 <input type="submit" name="woall"  value="Writeoff All" class="submit" onclick="return confirmWriteoffAll()" />
100 <input type="submit" name="payselected"  value="Pay Selected" class="submit"/>
101 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
102 </fieldset>
103 </form>
104 [% ELSE %]
105     <p>[% borrower.firstname %] [% borrower.surname %] has no outstanding fines.</p>
106 [% END %]
107 </div></div>
108
109 </div>
110 </div>
111
112 <div class="yui-b">
113 [% INCLUDE 'circ-menu.tt' %]
114 </div>
115 </div>
116 [% INCLUDE 'intranet-bottom.inc' %]