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