Bug 9259: Use is instead of is_deeply
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudgetperiods.tt
1 [% USE KohaDates %]
2 [% USE Price %]
3
4 [%- BLOCK action_menu %]
5     <div class="dropdown">
6         <a class="btn btn-mini dropdown-toggle" id="budgetmenu_[% block_budget_id %]" role="button" data-toggle="dropdown" href="#">
7            Actions <b class="caret"></b>
8         </a>
9         <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="budgetmenu_[% block_budget_id %]">
10               <li>
11                   <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% block_budget_id |html %]"><i class="fa fa-pencil"></i> Edit</a>
12               </li>
13               <li>
14                   <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% block_budget_id %]"><i class="fa fa-trash"></i> Delete</a>
15               </li>
16               <li>
17                   <a href="[% script_name %]?op=duplicate_form&amp;budget_period_id=[% block_budget_id %]"><i class="fa fa-copy"></i> Duplicate</a>
18               </li>
19               <li>
20                   <a href="[% script_name %]?op=close_form&amp;budget_period_id=[% block_budget_id %]"><i class="fa fa-times-circle"></i> Close</a>
21               </li>
22               <li>
23                   <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% block_budget_id %]"><i class="fa fa-plus"></i> Add fund</a>
24               </li>
25         </ul>
26     </div>
27 [% END -%]
28
29 [% INCLUDE 'doc-head-open.inc' %]
30 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
31 [% INCLUDE 'doc-head-close.inc' %]
32 [% INCLUDE 'calendar.inc' %]
33 [% INCLUDE 'datatables.inc' %]
34 [% IF close_form %]
35     <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
36     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
37 [% END %]
38 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
39 <script type="text/javascript">
40 // #################################################################################
41 // Javascript
42 // #################################################################################
43     function CheckDuplicateForm(f){
44             var ok=1;
45             var _alertString="";
46             var alertString="";
47             if(!(isNotNull(f.budget_period_startdate,1))){
48               _alertString += "\n- " + _("Start date missing");
49             }
50             if (!(isNotNull(f.budget_period_enddate,1))){
51               _alertString += "\n- " + _("End date missing");
52             }
53             if( f.budget_period_startdate > f.budget_period_enddate ) {
54               _alertString += "\n- " + _("Start date must be before end date");
55             }
56             if (!(isNotNull(f.budget_period_description,1))){
57               _alertString += "\n- " + _("Budget description missing");
58             }
59
60             if(_alertString.length==0){
61               f.submit();
62             } else {
63               alertString += _("Form not submitted because of the following problem(s)");
64               alertString += "\n-----------------------------------------\n";
65               alertString += _alertString;
66               alert(alertString);
67             }
68     }
69     function Check(f) {
70             var ok=1;
71             var _alertString="";
72             var alertString2;
73
74             if (!(isNotNull(f.budget_period_startdate,1))) {
75                     _alertString += "\n- " + _("Start date missing");
76             }
77
78             if (!(isNotNull(f.budget_period_enddate,1))) {
79                     _alertString += "\n- " + _("End date missing");
80             }
81
82             if ( f.budget_period_startdate >   f.budget_period_enddate )  {
83                     _alertString += "\n- " + _("Start date must be before end date");
84             }
85
86             if (!(isNotNull(f.budget_period_description,1))) {
87                     _alertString += "\n- " + _("Description missing");
88             }
89
90             if (!(isNum(f.budget_period_total))) {
91                     _alertString += "\n- " + _("Amount must be a valid number, or empty");
92             }
93
94 /*
95                         checkBudgetTotal(f) {
96                         }
97 */
98
99             if (_alertString.length==0) {
100                     f.submit();
101             } else {
102                     alertString2  = _("Form not submitted because of the following problem(s)");
103                     alertString2 += "\n------------------------------------------------------------------------------------\n";
104                     alertString2 += _alertString;
105                     alert(alertString2);
106             }
107     }
108
109     $(document).ready(function() {
110         var tabs = $('#budgetsTabs').tabs();
111         [% IF ( tab ) %]
112             tabs.tabs("option", "active", [% tab %]);
113         [% END %]
114         $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
115             "aoColumnDefs": [
116                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
117                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
118             ],
119             "sPaginationType": "four_button",
120             'bAutoWidth': false
121         } ) );
122
123         [% IF close_form %]
124           $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
125             sDom: "t"
126           }));
127           $("#move_form").submit(function(){
128             var budget_from = "[% budget_period_description %]";
129             var budget_to = $("#to_budget_period_id").find("option:selected").html();
130             var alert_message = _("You have chosen to move all unreceived orders from '%s' to '%s'.").format(budget_from, budget_to);
131             alert_message += "\n" + _("This action cannot be reversed. Do you wish to continue?");
132             return confirm ( alert_message );
133           });
134         [% END %]
135         [% IF closed %]
136           var oTable = $("#closed_report").dataTable($.extend(true, {}, dataTablesDefaults, {
137             // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
138             "fnDrawCallback": function ( oSettings ) {
139                 if ( oSettings.aiDisplay.length == 0 )
140                 {
141                     return;
142                 }
143
144                 var nTrs = $('#closed_report tbody tr');
145                 var iColspan = nTrs[1].getElementsByTagName('td').length;
146                 var sLastGroup = "";
147                 for ( var i=0 ; i<nTrs.length ; i++ )
148                 {
149                     var iDisplayIndex = oSettings._iDisplayStart + i;
150                     var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[0];
151                     if ( sGroup != sLastGroup )
152                     {
153                         var nGroup = document.createElement( 'tr' );
154                         var nCell = document.createElement( 'td' );
155                         nCell.colSpan = iColspan;
156                         nCell.className = "group";
157                         nCell.innerHTML = sGroup;
158                         nGroup.appendChild( nCell );
159                         nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
160                         sLastGroup = sGroup;
161                     }
162                 }
163             },
164             "aoColumnDefs": [
165                 { "bVisible": false, "aTargets": [ 0, 1 ] },
166                 { "bSortable": false, "aTargets": ["_all"] }
167             ],
168             'bSort': true,
169             'aaSortingFixed': [[ 1, 'asc' ]],
170             "bAutoWidth": false,
171             "sPaginationType": "full_numbers"
172           }));
173         [% END %]
174     });
175 </script>
176
177 <title>
178     Koha &rsaquo; Administration &rsaquo; Budgets
179
180     [% IF ( add_form ) %]&rsaquo;
181         [% IF ( budget_period_id ) %]
182             Modify budget [% budget_period_description %]
183         [% ELSE %]
184             Add budget
185         [% END %]
186     [% END %]
187     [% IF ( duplicate_form ) %]&rsaquo; Duplicate budget[% END %]
188     [% IF ( delete_confirm ) %]&rsaquo;
189             Delete budget '[% budget_period_description %]'?
190     [% END %]
191     [% IF ( delete_confirmed ) %]&rsaquo;
192         Data deleted
193     [% END %]
194     [% IF close_form %]&rsaquo;
195       Close budget [% budget_period_description %]
196     [% END %]
197     [% IF closed %]&rsaquo;
198       Budget [% budget_period_description %] closed
199     [% END %]
200 </title>
201
202
203 </head>
204
205 <body id="admin_aqbudgetperiods" class="admin">
206
207 [% INCLUDE 'header.inc' %]
208 [% INCLUDE 'budgets-admin-search.inc' %]
209
210 <!-- ################################################################################# -->
211 <!-- BREADCRUMBS -->
212 <!-- ################################################################################# -->
213
214 <div id="breadcrumbs">
215     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
216     <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
217
218     [% IF ( add_form ) %]
219         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo;
220         [% IF ( budget_period_id ) %]
221             <span>Modify budget '[% budget_period_description %]'</span>
222         [% ELSE %]
223             <span>Add budget</span>
224         [% END %]
225     [% END %]
226     [% IF ( delete_confirm ) %]
227         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo;
228         [% IF ( total ) %]
229             <span>Cannot delete budget '[% budget_period_description %]'</span>
230         [% ELSE %]
231             <span>Delete budget '[% budget_period_description %]'?</span>
232         [% END %]
233     [% END %]
234     [% IF ( duplicate_form ) %]
235         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo; Duplicate budget
236     [% END %]
237     [% IF close_form %]
238         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo;
239         <span>Close budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a></span>
240     [% END %]
241     [% IF closed %]
242         <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> &rsaquo;
243         <span>Budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a> closed</span>
244     [% END %]
245     [% IF ( else ) %]
246         <span>Budgets administration</span>
247     [% END %]
248 </div>
249
250 <div id="doc3" class="yui-t2">
251 <div id="bd">
252 <div id="yui-main">
253 <div class="yui-b">
254
255 [% UNLESS close_form OR closed%]
256   [% INCLUDE 'budgets-admin-toolbar.inc' %]
257 [% END %]
258
259 [% IF ( duplicate_form ) %]
260 <h3>Duplicate budget</h3>
261 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
262     <fieldset class="rows">
263     <input type="hidden" name="op" value="duplicate_budget" />
264     <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
265
266     <ol>
267
268     <li>
269     <label class="required" for="from">Start date: </label>
270     <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
271                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
272     </li>
273     <li>
274
275     <label class="required" for="to">End date: </label>
276     <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
277                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
278     </li>
279
280     <li>
281     <label class="required" for="budget_period_description">Description</label>
282     <input type="text" id="budget_period_description" name="budget_period_description" value="[% budgetperiod.budget_period_description %]" />
283     </li>
284
285     <li>
286       <label for="amount_change_percentage">Change amounts by</label>
287       <input type="text" id="amount_change_percentage" name="amount_change_percentage" /> %
288       <div class="hint">(can be positive or negative)</div>
289     </li>
290
291     <li>
292       <label for="amount_change_round_increment">If amounts changed, round to a multiple of</label>
293       <input type="text" id="amount_change_round_increment" name="amount_change_round_increment" />
294       <div class="hint">(amounts will be rounded down)</div>
295     </li>
296
297     <li>
298       <label for="mark_as_inactive">Mark the original budget as inactive</label>
299       <input type="checkbox" id="mark_as_inactive" name="mark_original_budget_as_inactive" />
300     </li>
301
302     <li>
303       <label for="reset_all_budgets">Set all funds to zero</label>
304       <input type="checkbox" id="reset_all_budgets" name="reset_all_budgets" />
305     </li>
306
307     </ol>
308     </fieldset>
309
310     <fieldset class="action">
311         <input type="button" value="Save Changes"  onclick="CheckDuplicateForm(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">Cancel</a>
312     </fieldset>
313
314 </form>
315
316 [% END %]
317
318 [% IF ( add_form ) %]
319     <!--  add or modify a budget period   -->
320
321     [% IF ( budget_period_id ) %]
322         <h3>Modify budget <i>[% budget_period_description %]</i></h3>
323     [% ELSE %]
324         <h3>Add budget</h3>
325         [% END %]
326 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
327     <fieldset class="rows">
328     <!-- ################################################################################# -->
329     <!-- display information about the budget period that must be added or modified -->
330     <!-- ################################################################################# -->
331     <input type="hidden" name="op" value="add_validate" />
332     <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
333     <ol>
334     <li>
335     <label class="required" for="from">Start date: </label>
336     <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
337                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
338     </li>
339     <li>
340
341     <label class="required" for="to">End date: </label>
342     <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
343                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
344     </li>
345
346     <li>
347         <!-- DESCRIPTION -->
348         <!-- ############################## -->
349         <label class="required" for="budget_period_description">Description: </label>
350         <input type="text" id="budget_period_description" name="budget_period_description"
351         size="48" maxlength="80" value="[% budget_period_description %]" />
352     </li>
353
354     <li>
355         <!-- TOTAL -->
356         <!-- ############################## -->
357         <label for="budget_period_total">Total amount: </label>
358         <input type="text" id="budget_period_total" name="budget_period_total"
359         size="10" maxlength="80" value="[% budget_period_total | $Price on_editing => 1 %]" />
360     </li>
361
362     <li>
363         <!-- ACTIVE -->
364         <!-- ############################## -->
365         <label for="budget_period_active">Make budget active: </label>
366         [% IF ( budget_period_active ) %]<input type="checkbox" checked="checked" id="budget_period_active" name="budget_period_active" value="1" />[% ELSE %]  <input type="checkbox" id="budget_period_active" name="budget_period_active" value="1"/> [% END %]
367     </li>
368
369     <li>
370         <!-- LOCK  -->
371         <!-- ############################## -->
372         <label for="budget_period_locked">Lock budget: </label>
373         [% IF ( budget_period_locked ) %]<input type="checkbox" checked="checked" id="budget_period_locked" name="budget_period_locked" value="1" />[% ELSE %]  <input type="checkbox" id="budget_period_locked" name="budget_period_locked" value="1"/> [% END %]
374     </li>
375     </ol>
376     </fieldset>
377
378     <fieldset class="action">
379         <!-- "save changes" button -->
380         <!-- ###################################### -->
381         <input type="button" value="Save"  onclick="Check(this.form)" />
382         <!--             <input type="submit" value="Save Changes"  />  -->
383         [% IF ( budget_period_id ) %]
384             <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>
385         [% ELSE %]
386             <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl" class="cancel">Cancel</a>
387         [% END %]
388     </fieldset>
389
390 </form>
391
392 [% END %]
393
394 <!-- ####################################################################### -->
395 <!-- delete a budget period -->
396 <!-- ####################################################################### -->
397
398 [% IF ( delete_confirm ) %]
399     [% IF ( total ) %]
400         <div class="dialog message">
401         <h3>Cannot delete budget</h3>
402         <p><strong>This record is used [% total %] times</strong>
403         . Deletion is not possible.</p>
404     [% ELSE %]
405         <div class="dialog alert">
406         <h3>Delete budget '[% budget_period_description %]'?</h3>
407     [% END %]
408
409     <!-- ############################################################# -->
410     <!-- "delete" and "cancel" buttons    -->
411     <!-- ############################################################# -->
412
413     <form action="[% script_name %]" method="post">
414         <input type="hidden" name="op" value="delete_confirmed" />
415         <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
416         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
417     </form>
418     <form action="[% script_name %]" method="post">
419         <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
420     </form>
421
422     </div>
423 [% END %]
424
425 [% IF close_form %]
426   [% IF budget_periods.size == 0 %]
427     You cannot move funds of this budget, there is no active budget.
428     Please create a new active budget and retry.
429     <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
430   [% ELSIF number_of_unreceived_orders == 0 %]
431     There are no unreceived orders for this budget.
432     <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
433   [% ELSE %]
434     <h3>The unreceived orders from the following funds will be moved</h3>
435       Fund list of budget <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a>:
436     <table id="budgeth">
437       <thead>
438         <tr>
439             <th>Fund id</th>
440             <th>Fund code</th>
441             <th>Fund name</th>
442             <th>Unreceived orders</th>
443         </tr>
444       </thead>
445       <tbody>
446         [% FOREACH budget IN budgets_to_move %]
447           <tr>
448             <td>[% budget.budget_id %]</td>
449             <td>[% budget.budget_code_indent %]</td>
450             <td>[% budget.budget_name %]</td>
451             <td>[% budget.unreceived_orders.size %]</td>
452           </tr>
453         [% END %]
454       </tbody>
455     </table>
456     <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post" id="move_form">
457       <fieldset class="rows">
458         <ol>
459           <li>
460             <label class="required" for="to_budget_period_id">Select a budget</label>
461             <select name="to_budget_period_id" id="to_budget_period_id" required="required">
462               <option value=""></option>
463               [% FOR budget_period IN budget_periods %]
464                 <option value="[% budget_period.budget_period_id %]">[% budget_period.budget_period_description %]</option>
465               [% END %]
466             </select>
467           </li>
468           <li>
469           <label for="move_remaining_unspent">Move remaining unspent funds</label>
470             <input type="checkbox" name="move_remaining_unspent" id="move_remaining_unspent" />
471           </li>
472         </ol>
473       </fieldset>
474       <fieldset class="action">
475           <input type="hidden" name="op" value="close_confirmed" />
476           <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
477           <input type="submit" value="Move unreceived orders" />
478           <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Cancel</a>
479       </fieldset>
480     </form>
481   [% END %]
482 [% ELSIF closed %]
483   <h3>Report after moving unreceived orders from budget [% from_budget_period.budget_period_description %] ([% from_budget_period.budget_period_startdate | $KohaDates %] - [% from_budget_period.budget_period_enddate | $KohaDates %]) to [% to_budget_period.budget_period_description %] ([% to_budget_period.budget_period_startdate | $KohaDates %] - [% to_budget_period.budget_period_enddate | $KohaDates%])</h3>
484
485   <table id="closed_report">
486     <thead>
487       <tr>
488         <td>Budget id</td>
489         <td>Basket</td>
490         <td>Ordernumber</td>
491         <td>Details</td>
492       </tr>
493     </thead>
494     <tbody>
495       [% FOR r IN report %]
496           [% IF r.moved %]
497             [% IF r.orders_moved.size > 0 %]
498               [% FOR order IN r.orders_moved %]
499                 <tr>
500                   <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %]) Amount=[% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
501                   <td>[% order.basketname %]</td>
502                   <td>[% order.ordernumber %]</td>
503                   <td>Moved!</td>
504                 </tr>
505               [% END %]
506             [% ELSE %]
507               <tr>
508                 <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %])</td>
509                 <td></td>
510                 <td></td>
511                 <td>There were no unreceived orders for this fund.</td>
512               </tr>
513             [% END %]
514           [% ELSE %]
515             [% IF r.error == 'budget_code_not_exists' %]
516               <tr>
517                 <td>[% r.budget.budget_id %] [% r.budget.budget_amount | $Price %][% IF r.unspent_moved %] ([% r.unspent_moved | $Price %] remaining has been moved)[% END %]</td>
518                 <td></td>
519                 <td></td>
520                 <td>This fund code does not exist in the destination budget.</td>
521               </tr>
522             [% END %]
523           [% END %]
524         </tr>
525       [% END %]
526     </tbody>
527   </table>
528   <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
529 [% END %]
530
531 <!--  DEFAULT  display budget periods list -->
532 [% IF ( else ) %]
533   <h2>Budgets administration</h2>
534
535   [% INCLUDE 'budgets-active-currency.inc' %]
536
537   <div id="budgetsTabs" class="toptabs">
538     <ul>
539         <li><a href="#active">Active budgets</a></li>
540         <li><a href="#inactive">Inactive budgets</a></li>
541     </ul>
542
543     <div id="active">
544       [% IF ( period_active_loop ) %]
545         <table id="activeperiodst">
546           <thead>
547             <tr>
548               <th>Budget name</th>
549               <th class="title-string">Start date</th>
550               <th class="title-string">End date</th>
551               <th>Locked</th>
552               <th>Total</th>
553               <th>Actions</th>
554             </tr>
555           </thead>
556           <tbody>
557               [% FOREACH period_active IN period_active_loop %]
558                 <tr>
559                 <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_active.budget_period_id %]" title="View funds for [% period_active.budget_period_description %]">[% period_active.budget_period_description %]</a></td>
560                 <td><span title="[% period_active.budget_period_startdate %]">[% period_active.budget_period_startdate | $KohaDates %]</span></td>
561                 <td><span title="[% period_active.budget_period_enddate %]">[% period_active.budget_period_enddate | $KohaDates %]</span></td>
562                 <td>
563                   [% IF ( period_active.budget_period_locked ) %]
564                     <span style="color:green;">Locked</span>&nbsp;
565                   [% END %]
566                 </td>
567                 <td class="data">[% period_active.budget_period_total | $Price %]</td>
568                 <td>
569                     [% PROCESS action_menu block_budget_id=period_active.budget_period_id %]
570                 </td>
571                 </tr>
572               [% END %]
573           </tbody>
574         </table>
575       [% ELSE %]
576         No active budgets
577       [% END %]
578     </div>
579     <div id="inactive">
580       [% IF ( period_inactive_loop ) %]
581         <table id="inactiveperiodst">
582           <thead>
583               <tr>
584                   <th>Budget name</th>
585                   <th class="title-string">Start date</th>
586                   <th class="title-string">End date</th>
587                   <th>Locked</th>
588                   <th>Total</th>
589                   <th>Actions</th>
590               </tr>
591           </thead>
592           <tbody>
593               [% FOREACH period_loo IN period_inactive_loop %]
594                   <tr>
595                   <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id %]" title="View funds for [% period_loo.budget_period_description %]">[% period_loo.budget_period_description %]</a></td>
596                   <td><span title="[% period_loo.budget_period_startdate %]">[% period_loo.budget_period_startdate | $KohaDates %]</span></td>
597                   <td><span title="[% period_loo.budget_period_enddate %]">[% period_loo.budget_period_enddate | $KohaDates %]</span></td>
598                   <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span>&nbsp;[% ELSE %][% END %] </td>
599                   <td class="data">[% period_loo.budget_period_total | $Price %]</td>
600                   <td>
601                         [% PROCESS action_menu block_budget_id=period_loo.budget_period_id %]
602                   </td>
603                   </tr>
604               [% END %]
605           </tbody>
606         </table>
607       [% ELSE %]
608         No inactive budgets
609       [% END %]
610     </div>
611   </div>
612 [% END %]
613
614
615 </div>
616 </div>
617 <div class="yui-b">
618 [% INCLUDE 'acquisitions-menu.inc' %]
619 </div>
620 </div>
621
622 [% INCLUDE 'intranet-bottom.inc' %]