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",
107 Koha › Administration › Budgets
109 [% IF ( add_form ) %]›
110 [% IF ( budget_period_id ) %]
111 Modify budget'[% budget_period_id %]'
116 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
117 [% IF ( delete_confirm ) %]›
118 Delete budget '[% budget_period_description %]'?
120 [% IF ( delete_confirmed ) %]›
128 <body id="admin_aqbudgetperiods" class="admin">
130 [% INCLUDE 'header.inc' %]
131 [% INCLUDE 'budgets-admin-search.inc' %]
133 <!-- ################################################################################# -->
135 <!-- ################################################################################# -->
137 <div id="breadcrumbs">
138 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
139 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
141 <!-- add or modify a budget period -->
142 <!-- ####################################### -->
143 [% IF ( add_form ) %]
144 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
145 [% IF ( budget_period_id ) %]
146 Modify budget [% budget_period_description %]
153 <!-- delete a budget period -->
154 <!-- ################################ -->
155 [% IF ( delete_confirm ) %]
156 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
158 Cannot delete budget '[% budget_period_description %]'
160 Delete budget '[% budget_period_description %]'?
163 <!-- duplicate a budget -->
164 [% IF ( duplicate_form ) %]
165 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
167 <!-- display budget periods list -->
168 <!-- ########################################## -->
170 Budgets administration
174 <div id="doc3" class="yui-t2">
179 [% INCLUDE 'budgets-admin-toolbar.inc' %]
181 [% IF ( duplicate_form ) %]
182 <h3>Duplicate budget</h3>
183 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
184 <fieldset class="rows">
185 <input type="hidden" name="op" value="duplicate_budget" />
186 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
191 <label class="required" for="from">Start date: </label>
192 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
193 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
197 <label class="required" for="to">End date: </label>
198 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
199 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
205 <fieldset class="action">
206 <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>
213 [% IF ( add_form ) %]
214 <!-- add or modify a budget period -->
216 [% IF ( budget_period_id ) %]
217 <h3>Modify budget</h3>
221 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
222 <fieldset class="rows">
223 <!-- ################################################################################# -->
224 <!-- display information about the budget period that must be added or modified -->
225 <!-- ################################################################################# -->
226 <input type="hidden" name="op" value="add_validate" />
227 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
230 <label class="required" for="from">Start date: </label>
231 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
232 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
236 <label class="required" for="to">End date: </label>
237 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
238 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
243 <!-- ############################## -->
244 <label class="required" for="budget_period_description">Description: </label>
245 <input type="text" id="budget_period_description" name="budget_period_description"
246 size="48" maxlength="80" value="[% budget_period_description %]" />
251 <!-- ############################## -->
252 <label for="budget_period_total">Total amount: </label>
253 <input type="text" id="budget_period_total" name="budget_period_total"
254 size="10" maxlength="80" value="[% budget_period_total %]" />
259 <!-- ############################## -->
260 <label for="budget_period_active">Make budget active: </label>
261 [% 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 %]
266 <!-- ############################## -->
267 <label for="budget_period_locked">Lock budget: </label>
268 [% 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 %]
273 <fieldset class="action">
274 <!-- "save changes" button -->
275 <!-- ###################################### -->
276 <input type="button" value="Save changes" onclick="Check(this.form)" />
277 <!-- <input type="submit" value="Save Changes" /> -->
278 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
285 <!-- ####################################################################### -->
286 <!-- delete a budget period -->
287 <!-- ####################################################################### -->
289 [% IF ( delete_confirm ) %]
291 <div class="dialog message">
292 <h3>Cannot delete budget</h3>
293 <p><strong>This record is used [% total %] times</strong>
294 . Deletion is not possible.</p>
296 <div class="dialog alert">
297 <h3>Delete budget '[% budget_period_description %]'?</h3>
300 <!-- ############################################################# -->
301 <!-- "delete" and "cancel" buttons -->
302 <!-- ############################################################# -->
304 <form action="[% script_name %]" method="post">
305 <input type="hidden" name="op" value="delete_confirmed" />
306 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
307 <input type="submit" class="approve" value="Delete" />
310 <form action="[% script_name %]" method="post">
311 <input type="submit" class="deny" value="Cancel" />
316 <!-- DEFAULT display budget periods list -->
318 <h2>Budgets administration</h2>
320 [% INCLUDE 'budgets-active-currency.inc' %]
322 <div id="budgetsTabs" class="toptabs">
324 <li><a href="#active">Active budgets</a></li>
325 <li><a href="#inactive">Inactive budgets</a></li>
329 [% IF ( period_active_loop ) %]
330 <table id="activeperiodst">
342 [% FOREACH period_active IN period_active_loop %]
344 <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>
345 <td>[% period_active.budget_period_startdate | $KohaDates %]</td>
346 <td>[% period_active.budget_period_enddate | $KohaDates %]</td>
348 [% IF ( period_active.budget_period_locked ) %]
349 <span style="color:green;">Locked</span>
352 <td align='right'>[% period_active.budget_period_total %]</td>
354 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
355 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_active.budget_period_id %]">Delete</a>
356 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
365 <div class="paginationBar">[% active_pagination_bar %]</div>
368 [% IF ( period_inactive_loop ) %]
369 <table id="inactiveperiodst">
381 [% FOREACH period_loo IN period_inactive_loop %]
382 [% IF ( loop.odd ) %]
385 <tr class="highlight">
387 <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>
388 <td>[% period_loo.budget_period_startdate | $KohaDates %]</td>
389 <td>[% period_loo.budget_period_enddate | $KohaDates %]</td>
390 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
391 <td align='right'>[% period_loo.budget_period_total %]</td>
393 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
394 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
395 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
404 <div class="pages">[% inactive_pagination_bar %]</div>
413 [% INCLUDE 'acquisitions-menu.inc' %]
417 [% INCLUDE 'intranet-bottom.inc' %]