Bug 16594: Orders by fund report has wrong link to css and other issues
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / orders_by_budget.tt
1 [% USE Price %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Reports &rsaquo; Orders by fund</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 </head>
6 <body id="rep_orders_by_budget" class="rep">
7 [% INCLUDE 'header.inc' %]
8 [% INCLUDE 'cat-search.inc' %]
9
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11 [% INCLUDE 'datatables.inc' %]
12 <script type="text/javascript">
13     $(document).ready( function () {
14         $('#funds').DataTable($.extend(true, {}, dataTablesDefaults,{"sPaginationType": "full_numbers"}));
15
16         showallbudgets = $('#budgetfilter').html();
17         $('#budgetfilter .b_inactive').remove();
18
19         $('#showbudgets').click(function(){
20             if ($(this).is(":checked")) {
21                 $('#budgetfilter').html(showallbudgets);
22             } else {
23                 $('#budgetfilter .b_inactive').remove();
24             }
25         });
26     } );
27 </script>
28 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_orders ) %] &rsaquo; <a href="/cgi-bin/koha/reports/orders_by_fund.pl">Orders by fund</a> &rsaquo; Results[% ELSE %] &rsaquo; Orders by fund[% END %]</div>
29
30 <div id="doc3" class="yui-t2">
31
32 <div id="bd">
33         <div id="yui-main">
34         <div class="yui-b">
35
36 [% IF ( current_budget_name ) %]<h1>Orders for fund '[% current_budget_name %]'</h1>
37 [% ELSE %]<h1>Orders by fund</h1>
38 [% END %]
39
40 [% IF ( get_orders ) %]
41     <div class="results">
42         [% IF ( total ) %]
43             Orders found: [% total %]
44         [% ELSE %]
45             No order found
46         [% END %]
47     </div>
48
49     [% IF ( ordersloop ) %]<table id="funds">
50         <thead>
51         <tr>
52         <th>Fund</th>
53         <th>Basket</th>
54         <th>Basket name</th>
55         <th>Basket by</th>
56         <th>Title</th>
57         <th>Currency</th>
58         <th>List price</th>
59         <th>RRP</th>
60         <th>Budgeted cost</th>
61         <th>Quantity</th>
62         <th>Total RRP</th>
63         <th>Total cost</th>
64         <th>Entry date</th>
65         <th>Date received</th>
66         <th>Internal note</th>
67         <th>Vendor note</th>
68         </tr>
69         </thead>
70         <tbody>
71         [% FOREACH ordersloo IN ordersloop %]
72             [% UNLESS ( loop.odd ) %]<tr class="highlight">
73             [% ELSE %] <tr>
74             [% END %]
75             <td>[% ordersloo.budget_name |html %]</td>
76             <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% ordersloo.basketno %]"> [% ordersloo.basketno |html %]</a></td>
77             <td>[% ordersloo.basketname |html %]</td>
78             <td>[% ordersloo.authorisedbyname %]</td>
79             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ordersloo.biblionumber %]"> [% ordersloo.title |html %]</a></td>
80             <td>[% ordersloo.currency %]</td>
81             <td>[% ordersloo.listprice | $Price %]</td>
82             <td>[% ordersloo.rrp | $Price %]</td>
83             <td>[% ordersloo.ecost | $Price %]</td>
84             <td>[% ordersloo.quantity %]</td>
85             <td>[% ordersloo.total_rrp | $Price %]</td>
86             <td>[% ordersloo.total_ecost | $Price %]</td>
87             <td>[% ordersloo.entrydate %]</td>
88             <td>[% ordersloo.datereceived %]</td>
89             <td>[% ordersloo.order_internalnote |html %]</td>
90             <td>[% ordersloo.order_vendornote |html %]</td>
91             </tr>
92         [% END %]
93         </tbody>
94         <tfoot><tr><th>TOTAL</th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th>[% total_quantity  %]</th><th>[% total_rrp | $Price %]</th><th>[% total_ecost | $Price %]</th><th></th><th></th><th></th><th></th></tr></tfoot>
95         </table>
96     [% END %]
97     [% ELSE %]
98         <form name="f" action="/cgi-bin/koha/reports/orders_by_fund.pl" method="post">
99         <fieldset class="rows">
100         <legend>Filters</legend>
101         <ol><li><label for="budgetfilter">Fund: </label>
102         <select name="budgetfilter" id="budgetfilter">
103             <option value="">All funds</option>
104             <option value="activebudgets">All active funds</option>
105         [% FOREACH budgetsloo IN budgetsloop %]
106             [% IF ( budgetsloo.selected ) %]
107                 <option value="[% budgetsloo.value %]" selected="selected">
108             [% ELSE %]
109                 [% bdgclass=budgetsloo.active? "": "b_inactive" %]
110                     <option class="[% bdgclass %]" value="[% budgetsloo.value %]">
111             [% END %]
112             [% budgetsloo.description %] [% IF !budgetsloo.active %](inactive)[% END %]
113             </option>
114         [% END %]
115         </select>
116         <label for="showallbudgets" style="float:none;">&nbsp;Show inactive:</label>
117         <input type="checkbox" id="showbudgets" />
118         </li></ol>
119         </fieldset>
120
121         <fieldset class="rows">
122         <legend>Output</legend>
123         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
124             <li><label for="outputfile">To a file:</label>
125                 <input type="radio" name="output" value="file" id="outputfile" />
126                 <label class="inline" for="basename">Named: </label>
127                 <input type="text" name="basename" id="basename" value="Export" />
128                 <label class="inline" for="MIME">Into an application </label>
129                 <select id='MIME' name='MIME' size='1'>
130                 [% FOREACH outputFormatloo IN outputFormatloop %]
131                     <option value="[% outputFormatloo %]">[% outputFormatloo %]</option>
132                 [% END %]
133                 </select>
134                 <select id='sep' name='sep' size='1'>
135                 [% FOREACH delimiterloo IN delimiterloop %]
136                     [% IF delimiterloo == delimiterPreference %]
137                         <option value="[% delimiterloo %]">[% delimiterloo %]</option>
138                     [% END %]
139                 [% END %]
140                 [% FOREACH delimiterloo IN delimiterloop %]
141                     [% IF delimiterloo != delimiterPreference %]
142                         <option value="[% delimiterloo %]">[% delimiterloo %]</option>
143                     [% END %]
144                 [% END %]
145                 </select>
146         </li></ol>
147         </fieldset>
148
149         <fieldset class="action">
150         <input type="submit" value="Submit" />
151         <input type="hidden" name="get_orders" value="1" /></fieldset>
152         </form>
153
154     [% END %]
155
156 </div>
157 </div>
158 <div class="yui-b">
159 [% INCLUDE 'reports-menu.inc' %]
160 </div>
161 </div>
162 [% INCLUDE 'intranet-bottom.inc' %]