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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
10 <script type="text/javascript">
11 // #################################################################################
13 // #################################################################################
14 function CheckDuplicateForm(f){
18 if(!(isNotNull(f.budget_period_startdate,1))){
19 _alertString += "\n- " + _("Start date missing");
21 if (!(isNotNull(f.budget_period_enddate,1))){
22 _alertString += "\n- " + _("End date missing");
24 if( f.budget_period_startdate > f.budget_period_enddate ) {
25 _alertString += "\n- " + _("Start date must be before end date");
28 if(_alertString.length==0){
31 alertString += _("Form not submitted because of the following problem(s)");
32 alertString += "\n-----------------------------------------\n";
33 alertString += _alertString;
42 if (!(isNotNull(f.budget_period_startdate,1))) {
43 _alertString += "\n- " + _("Start date missing");
46 if (!(isNotNull(f.budget_period_enddate,1))) {
47 _alertString += "\n- " + _("End date missing");
50 if ( f.budget_period_startdate > f.budget_period_enddate ) {
51 _alertString += "\n- " + _("Start date must be before end date");
54 if (!(isNotNull(f.budget_period_description,1))) {
55 _alertString += "\n- " + _("Description missing");
58 if (!(isNum(f.budget_period_total))) {
59 _alertString += "\n- " + _("Amount must be a valid number, or empty");
67 if (_alertString.length==0) {
70 alertString2 = _("Form not submitted because of the following problem(s)");
71 alertString2 += "\n------------------------------------------------------------------------------------\n";
72 alertString2 += _alertString;
79 [% IF ( dateformat == 'metric' ) %]
80 dt_add_type_uk_date();
82 $(document).ready(function() {
83 var tabs = $('#budgetsTabs').tabs();
85 tabs.tabs('select', [% tab %]);
87 $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
90 [% IF ( dateformat == 'metric' ) %]
91 "aTargets": [ 1, 2 ], "sType": "uk_date",
93 "bSortable": false, 'aTargets':['_all'],
96 "sPaginationType": "four_button",
106 Koha › Administration › Budgets
108 [% IF ( add_form ) %]›
109 [% IF ( budget_period_id ) %]
110 Modify budget'[% budget_period_id %]'
115 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
116 [% IF ( delete_confirm ) %]›
117 Delete budget '[% budget_period_description %]'?
119 [% IF ( delete_confirmed ) %]›
127 <body id="admin_aqbudgetperiods" class="admin">
129 [% INCLUDE 'header.inc' %]
130 [% INCLUDE 'budgets-admin-search.inc' %]
132 <!-- ################################################################################# -->
134 <!-- ################################################################################# -->
136 <div id="breadcrumbs">
137 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
138 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
140 <!-- add or modify a budget period -->
141 <!-- ####################################### -->
142 [% IF ( add_form ) %]
143 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
144 [% IF ( budget_period_id ) %]
145 Modify budget [% budget_period_description %]
152 <!-- delete a budget period -->
153 <!-- ################################ -->
154 [% IF ( delete_confirm ) %]
155 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
157 Cannot delete budget '[% budget_period_description %]'
159 Delete budget '[% budget_period_description %]'?
162 <!-- duplicate a budget -->
163 [% IF ( duplicate_form ) %]
164 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
166 <!-- display budget periods list -->
167 <!-- ########################################## -->
169 Budgets administration
173 <div id="doc3" class="yui-t2">
178 [% INCLUDE 'budgets-admin-toolbar.inc' %]
180 [% IF ( duplicate_form ) %]
181 <h3>Duplicate budget</h3>
182 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
183 <fieldset class="rows">
184 <input type="hidden" name="op" value="duplicate_budget" />
185 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
190 <label class="required" for="from">Start date</label>
191 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
192 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
196 <label class="required" for="to">End date</label>
197 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
198 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
204 <fieldset class="action">
205 <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>
212 [% IF ( add_form ) %]
213 <!-- add or modify a budget period -->
215 [% IF ( budget_period_id ) %]
216 <h3>Modify budget</h3>
220 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
221 <fieldset class="rows">
222 <!-- ################################################################################# -->
223 <!-- display information about the budget period that must be added or modified -->
224 <!-- ################################################################################# -->
225 <input type="hidden" name="op" value="add_validate" />
226 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
229 <label class="required" for="from">Start date</label>
230 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
231 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
235 <label class="required" for="to">End date</label>
236 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
237 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
242 <!-- ############################## -->
243 <label class="required" for="budget_period_description">Description</label>
244 <input type="text" id="budget_period_description" name="budget_period_description"
245 size="48" maxlength="80" value="[% budget_period_description %]" />
250 <!-- ############################## -->
251 <label for="budget_period_total">Total amount</label>
252 <input type="text" id="budget_period_total" name="budget_period_total"
253 size="10" maxlength="80" value="[% budget_period_total %]" />
258 <!-- ############################## -->
259 <label for="budget_period_active">Make budget active</label>
260 [% 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 %]
265 <!-- ############################## -->
266 <label for="budget_period_locked">Lock budget</label>
267 [% 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 %]
272 <fieldset class="action">
273 <!-- "save changes" button -->
274 <!-- ###################################### -->
275 <input type="button" value="Save changes" onclick="Check(this.form)" />
276 <!-- <input type="submit" value="Save Changes" /> -->
277 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
284 <!-- ####################################################################### -->
285 <!-- delete a budget period -->
286 <!-- ####################################################################### -->
288 [% IF ( delete_confirm ) %]
290 <div class="dialog message">
291 <h3>Cannot delete budget</h3>
292 <p><strong>This record is used [% total %] times</strong>
293 . Deletion is not possible.</p>
295 <div class="dialog alert">
296 <h3>Delete budget '[% budget_period_description %]'?</h3>
299 <!-- ############################################################# -->
300 <!-- "delete" and "cancel" buttons -->
301 <!-- ############################################################# -->
303 <form action="[% script_name %]" method="post">
304 <input type="hidden" name="op" value="delete_confirmed" />
305 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
306 <input type="submit" class="approve" value="Delete" />
309 <form action="[% script_name %]" method="post">
310 <input type="submit" class="deny" value="Cancel" />
315 <!-- DEFAULT display budget periods list -->
317 <h2>Budgets administration</h2>
319 [% INCLUDE 'budgets-active-currency.inc' %]
321 <div id="budgetsTabs" class="toptabs">
323 <li><a href="#active">Active Budgets</a></li>
324 <li><a href="#inactive">Inactive Budgets</a></li>
328 [% IF ( period_active_loop ) %]
329 <table id="activeperiodst">
341 [% FOREACH period_active IN period_active_loop %]
343 <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>
344 <td>[% period_active.budget_period_startdate | $KohaDates %]</td>
345 <td>[% period_active.budget_period_enddate | $KohaDates %]</td>
347 [% IF ( period_active.budget_period_locked ) %]
348 <span style="color:green;">Locked</span>
351 <td align='right'>[% period_active.budget_period_total %]</td>
353 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
354 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_active.budget_period_id %]">Delete</a>
355 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_active.budget_period_id %]">Add Fund</a>
364 <div class="paginationBar">[% active_pagination_bar %]</div>
367 [% IF ( period_inactive_loop ) %]
368 <table id="inactiveperiodst">
380 [% FOREACH period_loo IN period_inactive_loop %]
381 [% IF ( loop.odd ) %]
384 <tr class="highlight">
386 <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>
387 <td>[% period_loo.budget_period_startdate | $KohaDates %]</td>
388 <td>[% period_loo.budget_period_enddate | $KohaDates %]</td>
389 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
390 <td align='right'>[% period_loo.budget_period_total %]</td>
392 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
393 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
394 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
403 <div class="pages">[% inactive_pagination_bar %]</div>
412 [% INCLUDE 'acquisitions-menu.inc' %]
416 [% INCLUDE 'intranet-bottom.inc' %]