2 [% INCLUDE 'doc-head-open.inc' %]
3 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 [% INCLUDE 'datatables.inc' %]
8 <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
11 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
12 <script type="text/javascript">
13 // #################################################################################
15 // #################################################################################
16 function CheckDuplicateForm(f){
20 if(!(isNotNull(f.budget_period_startdate,1))){
21 _alertString += "\n- " + _("Start date missing");
23 if (!(isNotNull(f.budget_period_enddate,1))){
24 _alertString += "\n- " + _("End date missing");
26 if( f.budget_period_startdate > f.budget_period_enddate ) {
27 _alertString += "\n- " + _("Start date must be before end date");
30 if(_alertString.length==0){
33 alertString += _("Form not submitted because of the following problem(s)");
34 alertString += "\n-----------------------------------------\n";
35 alertString += _alertString;
44 if (!(isNotNull(f.budget_period_startdate,1))) {
45 _alertString += "\n- " + _("Start date missing");
48 if (!(isNotNull(f.budget_period_enddate,1))) {
49 _alertString += "\n- " + _("End date missing");
52 if ( f.budget_period_startdate > f.budget_period_enddate ) {
53 _alertString += "\n- " + _("Start date must be before end date");
56 if (!(isNotNull(f.budget_period_description,1))) {
57 _alertString += "\n- " + _("Description missing");
60 if (!(isNum(f.budget_period_total))) {
61 _alertString += "\n- " + _("Amount must be a valid number, or empty");
69 if (_alertString.length==0) {
72 alertString2 = _("Form not submitted because of the following problem(s)");
73 alertString2 += "\n------------------------------------------------------------------------------------\n";
74 alertString2 += _alertString;
79 $(document).ready(function() {
80 var tabs = $('#budgetsTabs').tabs();
82 tabs.tabs("option", "active", [% tab %]);
84 $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
88 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
89 { "sType": "title-string", "aTargets" : [ "title-string" ] }
96 $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
99 $("#move_form").submit(function(){
100 var budget_from = "[% budget_period_description %]";
101 var budget_to = $("#budget_period").find("option:selected").html();
102 var alert_message = _("You have chosen to move all unreceived orders from '%s' to '%s'.").format(budget_from, budget_to);
103 alert_message += _("\nThis action cannot be reversed. Do you wish to continue?");
104 return confirm ( alert_message );
111 Koha › Administration › Budgets
113 [% IF ( add_form ) %]›
114 [% IF ( budget_period_id ) %]
115 Modify budget'[% budget_period_id %]'
120 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
121 [% IF ( delete_confirm ) %]›
122 Delete budget '[% budget_period_description %]'?
124 [% IF ( delete_confirmed ) %]›
127 [% IF close_form %]›
128 Close budget [% budget_period_description %]
135 <body id="admin_aqbudgetperiods" class="admin">
137 [% INCLUDE 'header.inc' %]
138 [% INCLUDE 'budgets-admin-search.inc' %]
140 <!-- ################################################################################# -->
142 <!-- ################################################################################# -->
144 <div id="breadcrumbs">
145 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
146 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
148 <!-- add or modify a budget period -->
149 <!-- ####################################### -->
150 [% IF ( add_form ) %]
151 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
152 [% IF ( budget_period_id ) %]
153 Modify budget [% budget_period_description %]
160 <!-- delete a budget period -->
161 <!-- ################################ -->
162 [% IF ( delete_confirm ) %]
163 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
165 Cannot delete budget '[% budget_period_description %]'
167 Delete budget '[% budget_period_description %]'?
170 <!-- duplicate a budget -->
171 [% IF ( duplicate_form ) %]
172 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
175 <!-- close a budget -->
177 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
178 Close budget <a href="cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a>
180 <!-- display budget periods list -->
181 <!-- ########################################## -->
183 Budgets administration
187 <div id="doc3" class="yui-t2">
192 [% UNLESS close_form %]
193 [% INCLUDE 'budgets-admin-toolbar.inc' %]
196 [% IF ( duplicate_form ) %]
197 <h3>Duplicate budget</h3>
198 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
199 <fieldset class="rows">
200 <input type="hidden" name="op" value="duplicate_budget" />
201 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
206 <label class="required" for="from">Start date: </label>
207 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
208 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
212 <label class="required" for="to">End date: </label>
213 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
214 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
218 <label for="mark_as_inactive">Mark the original budget as inactive</label>
219 <input type="checkbox" id="mark_as_inactive" name="mark_original_budget_as_inactive" />
223 <label for="reset_all_budgets">Set all funds to zero</label>
224 <input type="checkbox" id="reset_all_budgets" name="reset_all_budgets" />
230 <fieldset class="action">
231 <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>
238 [% IF ( add_form ) %]
239 <!-- add or modify a budget period -->
241 [% IF ( budget_period_id ) %]
242 <h3>Modify budget</h3>
246 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
247 <fieldset class="rows">
248 <!-- ################################################################################# -->
249 <!-- display information about the budget period that must be added or modified -->
250 <!-- ################################################################################# -->
251 <input type="hidden" name="op" value="add_validate" />
252 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
255 <label class="required" for="from">Start date: </label>
256 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
257 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
261 <label class="required" for="to">End date: </label>
262 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
263 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
268 <!-- ############################## -->
269 <label class="required" for="budget_period_description">Description: </label>
270 <input type="text" id="budget_period_description" name="budget_period_description"
271 size="48" maxlength="80" value="[% budget_period_description %]" />
276 <!-- ############################## -->
277 <label for="budget_period_total">Total amount: </label>
278 <input type="text" id="budget_period_total" name="budget_period_total"
279 size="10" maxlength="80" value="[% budget_period_total %]" />
284 <!-- ############################## -->
285 <label for="budget_period_active">Make budget active: </label>
286 [% 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 %]
291 <!-- ############################## -->
292 <label for="budget_period_locked">Lock budget: </label>
293 [% 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 %]
298 <fieldset class="action">
299 <!-- "save changes" button -->
300 <!-- ###################################### -->
301 <input type="button" value="Save changes" onclick="Check(this.form)" />
302 <!-- <input type="submit" value="Save Changes" /> -->
303 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
310 <!-- ####################################################################### -->
311 <!-- delete a budget period -->
312 <!-- ####################################################################### -->
314 [% IF ( delete_confirm ) %]
316 <div class="dialog message">
317 <h3>Cannot delete budget</h3>
318 <p><strong>This record is used [% total %] times</strong>
319 . Deletion is not possible.</p>
321 <div class="dialog alert">
322 <h3>Delete budget '[% budget_period_description %]'?</h3>
325 <!-- ############################################################# -->
326 <!-- "delete" and "cancel" buttons -->
327 <!-- ############################################################# -->
329 <form action="[% script_name %]" method="post">
330 <input type="hidden" name="op" value="delete_confirmed" />
331 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
332 <input type="submit" class="approve" value="Delete" />
335 <form action="[% script_name %]" method="post">
336 <input type="submit" class="deny" value="Cancel" />
343 [% IF budget_periods.size == 0 %]
344 You cannot move funds of this budget, there is no active budget.
345 Please create a new active budget and retry.
346 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
347 [% ELSIF number_of_unreceived_orders == 0 %]
348 There is no unreceived orders for this budget.
349 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Back</a>
351 <h3>Choose the funds you want to move unreceived orders:</h3>
352 Fund list of budget <a href="cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">[% budget_period_description %]</a>:
359 <th>Unreceived orders</th>
363 [% FOREACH budget IN budgets_to_move %]
365 <td>[% budget.budget_id %]</td>
366 <td>[% budget.budget_code_indent %]</td>
367 <td>[% budget.budget_name %]</td>
368 <td>[% budget.unreceived_orders.size %]</td>
373 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post" id="move_form">
374 <fieldset class="rows">
377 <label class="required" for="to_budget_period_id">Select a budget</label>
378 <select name="to_budget_period_id" id="to_budget_period_id" required="required">
379 <option value=""></option>
380 [% FOR budget_period IN budget_periods %]
381 <option value="[% budget_period.budget_period_id %]">[% budget_period.budget_period_description %]</option>
386 <label for="move_remaining_unspent">Move remaining unspent funds</label>
387 <input type="checkbox" name="move_remaining_unspent" id="move_remaining_unspent" />
391 <fieldset class="action">
392 <input type="hidden" name="op" value="close_confirmed" />
393 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
394 <input type="submit" value="Move unreceive orders" />
395 <a class="cancel" href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Cancel</a>
401 <!-- DEFAULT display budget periods list -->
403 <h2>Budgets administration</h2>
405 [% INCLUDE 'budgets-active-currency.inc' %]
407 <div id="budgetsTabs" class="toptabs">
409 <li><a href="#active">Active budgets</a></li>
410 <li><a href="#inactive">Inactive budgets</a></li>
414 [% IF ( period_active_loop ) %]
415 <table id="activeperiodst">
419 <th class="title-string">Start date</th>
420 <th class="title-string">End date</th>
427 [% FOREACH period_active IN period_active_loop %]
429 <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>
430 <td><span title="[% period_active.budget_period_startdate %]">[% period_active.budget_period_startdate | $KohaDates %]</span></td>
431 <td><span title="[% period_active.budget_period_enddate %]">[% period_active.budget_period_enddate | $KohaDates %]</span></td>
433 [% IF ( period_active.budget_period_locked ) %]
434 <span style="color:green;">Locked</span>
437 <td class="data">[% period_active.budget_period_total %]</td>
439 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
440 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_active.budget_period_id %]">Delete</a>
441 <a href="[% script_name %]?op=duplicate_form&budget_period_id=[% period_active.budget_period_id %]">Duplicate</a>
442 <a href="[% script_name %]?op=close_form&budget_period_id=[% period_active.budget_period_id %]">Close</a>
443 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
452 <div class="paginationBar">[% active_pagination_bar %]</div>
455 [% IF ( period_inactive_loop ) %]
456 <table id="inactiveperiodst">
460 <th class="title-string">Start date</th>
461 <th class="title-string">End date</th>
468 [% FOREACH period_loo IN period_inactive_loop %]
469 [% IF ( loop.odd ) %]
472 <tr class="highlight">
474 <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>
475 <td><span title="[% period_loo.budget_period_startdate %]">[% period_loo.budget_period_startdate | $KohaDates %]</span></td>
476 <td><span title="[% period_loo.budget_period_enddate %]">[% period_loo.budget_period_enddate | $KohaDates %]</span></td>
477 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
478 <td class="data">[% period_loo.budget_period_total %]</td>
480 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
481 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
482 <a href="[% script_name %]?op=duplicate_form&budget_period_id=[% period_loo.budget_period_id %]">Duplicate</a>
483 <a href="[% script_name %]?op=close_form&budget_period_id=[% period_loo.budget_period_id %]">Close</a>
484 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
493 <div class="pages">[% inactive_pagination_bar %]</div>
502 [% INCLUDE 'acquisitions-menu.inc' %]
506 [% INCLUDE 'intranet-bottom.inc' %]