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