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