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' %]
7 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
8 <script type="text/javascript">
9 // #################################################################################
11 // #################################################################################
12 function CheckDuplicateForm(f){
16 if(!(isNotNull(f.budget_period_startdate,1))){
17 _alertString += "\n- " + _("Start date missing");
19 if (!(isNotNull(f.budget_period_enddate,1))){
20 _alertString += "\n- " + _("End date missing");
22 if( f.budget_period_startdate > f.budget_period_enddate ) {
23 _alertString += "\n- " + _("Start date must be before end date");
26 if(_alertString.length==0){
29 alertString += _("Form not submitted because of the following problem(s)");
30 alertString += "\n-----------------------------------------\n";
31 alertString += _alertString;
40 if (!(isNotNull(f.budget_period_startdate,1))) {
41 _alertString += "\n- " + _("Start date missing");
44 if (!(isNotNull(f.budget_period_enddate,1))) {
45 _alertString += "\n- " + _("End date missing");
48 if ( f.budget_period_startdate > f.budget_period_enddate ) {
49 _alertString += "\n- " + _("Start date must be before end date");
52 if (!(isNotNull(f.budget_period_description,1))) {
53 _alertString += "\n- " + _("Description missing");
56 if (!(isNum(f.budget_period_total))) {
57 _alertString += "\n- " + _("Amount must be a valid number, or empty");
65 if (_alertString.length==0) {
68 alertString2 = _("Form not submitted because of the following problem(s)");
69 alertString2 += "\n------------------------------------------------------------------------------------\n";
70 alertString2 += _alertString;
77 [% IF ( dateformat == 'metric' ) %]
78 dt_add_type_uk_date();
80 $(document).ready(function() {
81 var tabs = $('#budgetsTabs').tabs();
83 tabs.tabs('select', [% tab %]);
85 $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
88 [% IF ( dateformat == 'metric' ) %]
89 "aTargets": [ 1, 2 ], "sType": "uk_date",
91 "bSortable": false, 'aTargets':['_all'],
94 "sPaginationType": "four_button",
105 Koha › Administration › Budgets
107 [% IF ( add_form ) %]›
108 [% IF ( budget_period_id ) %]
109 Modify budget'[% budget_period_id %]'
114 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
115 [% IF ( delete_confirm ) %]›
116 Delete budget '[% budget_period_description %]'?
118 [% IF ( delete_confirmed ) %]›
126 <body id="admin_aqbudgetperiods" class="admin">
128 [% INCLUDE 'header.inc' %]
129 [% INCLUDE 'budgets-admin-search.inc' %]
131 <!-- ################################################################################# -->
133 <!-- ################################################################################# -->
135 <div id="breadcrumbs">
136 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
137 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
139 <!-- add or modify a budget period -->
140 <!-- ####################################### -->
141 [% IF ( add_form ) %]
142 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
143 [% IF ( budget_period_id ) %]
144 Modify budget [% budget_period_description %]
151 <!-- delete a budget period -->
152 <!-- ################################ -->
153 [% IF ( delete_confirm ) %]
154 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
156 Cannot delete budget '[% budget_period_description %]'
158 Delete budget '[% budget_period_description %]'?
161 <!-- duplicate a budget -->
162 [% IF ( duplicate_form ) %]
163 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
165 <!-- display budget periods list -->
166 <!-- ########################################## -->
168 Budgets administration
172 <div id="doc3" class="yui-t2">
177 [% INCLUDE 'budgets-admin-toolbar.inc' %]
179 [% IF ( duplicate_form ) %]
180 <h3>Duplicate budget</h3>
181 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
182 <fieldset class="rows">
183 <input type="hidden" name="op" value="duplicate_budget" />
184 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
189 <label class="required" for="from">Start date: </label>
190 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
191 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
195 <label class="required" for="to">End date: </label>
196 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
197 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
203 <fieldset class="action">
204 <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>
211 [% IF ( add_form ) %]
212 <!-- add or modify a budget period -->
214 [% IF ( budget_period_id ) %]
215 <h3>Modify budget</h3>
219 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
220 <fieldset class="rows">
221 <!-- ################################################################################# -->
222 <!-- display information about the budget period that must be added or modified -->
223 <!-- ################################################################################# -->
224 <input type="hidden" name="op" value="add_validate" />
225 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
228 <label class="required" for="from">Start date: </label>
229 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
230 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
234 <label class="required" for="to">End date: </label>
235 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
236 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
241 <!-- ############################## -->
242 <label class="required" for="budget_period_description">Description: </label>
243 <input type="text" id="budget_period_description" name="budget_period_description"
244 size="48" maxlength="80" value="[% budget_period_description %]" />
249 <!-- ############################## -->
250 <label for="budget_period_total">Total amount: </label>
251 <input type="text" id="budget_period_total" name="budget_period_total"
252 size="10" maxlength="80" value="[% budget_period_total %]" />
257 <!-- ############################## -->
258 <label for="budget_period_active">Make budget active: </label>
259 [% 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 %]
264 <!-- ############################## -->
265 <label for="budget_period_locked">Lock budget: </label>
266 [% 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 %]
271 <fieldset class="action">
272 <!-- "save changes" button -->
273 <!-- ###################################### -->
274 <input type="button" value="Save changes" onclick="Check(this.form)" />
275 <!-- <input type="submit" value="Save Changes" /> -->
276 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
283 <!-- ####################################################################### -->
284 <!-- delete a budget period -->
285 <!-- ####################################################################### -->
287 [% IF ( delete_confirm ) %]
289 <div class="dialog message">
290 <h3>Cannot delete budget</h3>
291 <p><strong>This record is used [% total %] times</strong>
292 . Deletion is not possible.</p>
294 <div class="dialog alert">
295 <h3>Delete budget '[% budget_period_description %]'?</h3>
298 <!-- ############################################################# -->
299 <!-- "delete" and "cancel" buttons -->
300 <!-- ############################################################# -->
302 <form action="[% script_name %]" method="post">
303 <input type="hidden" name="op" value="delete_confirmed" />
304 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
305 <input type="submit" class="approve" value="Delete" />
308 <form action="[% script_name %]" method="post">
309 <input type="submit" class="deny" value="Cancel" />
314 <!-- DEFAULT display budget periods list -->
316 <h2>Budgets administration</h2>
318 [% INCLUDE 'budgets-active-currency.inc' %]
320 <div id="budgetsTabs" class="toptabs">
322 <li><a href="#active">Active budgets</a></li>
323 <li><a href="#inactive">Inactive budgets</a></li>
327 [% IF ( period_active_loop ) %]
328 <table id="activeperiodst">
340 [% FOREACH period_active IN period_active_loop %]
342 <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>
343 <td>[% period_active.budget_period_startdate | $KohaDates %]</td>
344 <td>[% period_active.budget_period_enddate | $KohaDates %]</td>
346 [% IF ( period_active.budget_period_locked ) %]
347 <span style="color:green;">Locked</span>
350 <td align='right'>[% period_active.budget_period_total %]</td>
352 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
353 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_active.budget_period_id %]">Delete</a>
354 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
363 <div class="paginationBar">[% active_pagination_bar %]</div>
366 [% IF ( period_inactive_loop ) %]
367 <table id="inactiveperiodst">
379 [% FOREACH period_loo IN period_inactive_loop %]
380 [% IF ( loop.odd ) %]
383 <tr class="highlight">
385 <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>
386 <td>[% period_loo.budget_period_startdate | $KohaDates %]</td>
387 <td>[% period_loo.budget_period_enddate | $KohaDates %]</td>
388 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
389 <td align='right'>[% period_loo.budget_period_total %]</td>
391 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
392 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
393 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
402 <div class="pages">[% inactive_pagination_bar %]</div>
411 [% INCLUDE 'acquisitions-menu.inc' %]
415 [% INCLUDE 'intranet-bottom.inc' %]