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