Merge remote-tracking branch 'origin/new/bug_7284'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / billing.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Billing</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <!-- Additions to enable Calendar system -->
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
6 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
7 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
8 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
9 <!-- End of additions -->
10 </head>
11 <body id="circ_billing" class="circ">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'circ-search.inc' %]
14
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Billing</div>
17
18 <div id="doc3" class="yui-t2">
19    
20    <div id="bd">
21         <div id="yui-main">
22         <div class="yui-b">
23
24 <h2>Billing from [% from %] to [% to %]</h2>
25 <h3>Reported  on [% todaysdate %]</h3>
26
27
28
29
30 [% IF ( billingloop ) %]
31 <h4>The following patrons have bills.</h4>
32     <table>
33     <tr>
34         <th>Patron
35         <a href="/cgi-bin/koha/circ/billing.pl?order=patron&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
36         </th>
37         <th>Fee Item
38         <a href="/cgi-bin/koha/circ/billing.pl?order=fee&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
39         </th>
40         <th>Description
41         <a href="/cgi-bin/koha/circ/billing.pl?order=desc&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
42         </th>
43         <th>Type
44         <a href="/cgi-bin/koha/circ/billing.pl?order=type&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
45         </th>
46         <th>Date
47         <a href="/cgi-bin/koha/circ/billing.pl?order=date&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
48         </th>
49         <th>Total Amount
50         <a href="/cgi-bin/koha/circ/billing.pl?order=total&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
51         </th>
52     </tr>
53     
54     [% FOREACH billingloo IN billingloop %]
55         <tr>
56                  <td>
57                                          <p><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% billingloo.borrowernumber %]">[% billingloo.patronname %]</a><br />[% billingloo.phone %]<br />
58                 [% IF ( billingloo.email ) %]<a href="mailto:[% billingloo.email %]?subject=Account: [% billingloo.title %]">
59                                  [% billingloo.email %]</a>[% END %]
60                 </p>
61                  </td>
62                 <td align="right">
63                     <p>[% billingloo.l_amountoutstanding %]</p>
64                 </td>
65                 <td>
66                     <p>[% billingloo.l_description %]</p>
67                 </td>
68                 <td>
69                     <p>[% billingloo.l_accounttype %]</p>
70                 </td>
71                 <td>
72                     <p>[% billingloo.l_date %]</p>
73                 </td>                
74                 <td align="right">
75                     <p>[% billingloo.sum_amount %]</p>
76                 </td>
77         </tr>
78     [% END %]
79     </table>
80     [% ELSE %]
81         <b>No items found.</b>
82     [% END %]
83
84 </div>
85 </div>
86 <div class="yui-b">
87 <form action="/cgi-bin/koha/circ/billing.pl" method="post" >
88 <fieldset class="brief">
89 <ol><li><label for="ratio">
90     Currency Cutoff:
91 </label>
92 <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li>
93 <li><label for="from">
94     Start date:
95 </label>
96 <input type="text" size="10" id="from" name="from" value="[% from %]" />
97 <img src="[% themelang %]/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
98 <script language="JavaScript" type="text/javascript">
99 function validate1(date) {
100     var day = date.getDate();
101     var month = date.getMonth() + 1;
102     var year = date.getFullYear();
103     var weekDay = date.getDay();
104     var dayMonth = month + '-' + day;
105     var dateString = year + '-' + month + '-' + day;
106     var dateTo = document.getElementById('to').value.split("-");
107     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
108     if (date > limitDate) {
109             return true;
110     } else {
111             return false;
112     }
113 }
114 Calendar.setup(
115         {
116         inputField : "from",
117         ifFormat : "[% DHTMLcalendar_dateformat %]",
118         button : "openCalendarFrom",
119         disableFunc : validate1,
120         dateStatusFunc : validate1
121         }
122 );
123 </script></li>
124 <li><label for="to" >
125     End date:
126 </label>
127 <input size="10" id="to" name="to" value="[% to %]" type="text" />
128 <img src="[% themelang %]/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
129 <script type="text/javascript">
130         function validate2(date) {
131             var day = date.getDate();
132             var month = date.getMonth() + 1;
133             var year = date.getFullYear();
134             var weekDay = date.getDay();
135             var dayMonth = month + '-' + day;
136             var dateString = year + '-' + month + '-' + day;
137             var dateFrom = document.getElementById('from').value.split("-");
138             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
139             if (limitDate > date) {
140                     return true;
141             } else {
142                     return false;
143             }
144         }
145
146         Calendar.setup(
147                 {
148                     inputField : "to",
149                     ifFormat : "[% DHTMLcalendar_dateformat %]",
150                     button : "openCalendarTo",
151                     disableFunc : validate2,
152                     dateStatusFunc : validate2
153                 }
154         );
155 </script>
156 (inclusive)</li></ol>
157
158 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset></fieldset>
159 </form>
160 </div>
161 </div>
162 [% INCLUDE 'intranet-bottom.inc' %]