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;
75 $(document).ready(function() {
76 var tabs = $('#budgetsTabs').tabs();
78 tabs.tabs("option", "active", [% tab %]);
80 $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
84 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
85 { "sType": "title-string", "aTargets" : [ "title-string" ] }
93 Koha › Administration › Budgets
95 [% IF ( add_form ) %]›
96 [% IF ( budget_period_id ) %]
97 Modify budget'[% budget_period_id %]'
102 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
103 [% IF ( delete_confirm ) %]›
104 Delete budget '[% budget_period_description %]'?
106 [% IF ( delete_confirmed ) %]›
114 <body id="admin_aqbudgetperiods" class="admin">
116 [% INCLUDE 'header.inc' %]
117 [% INCLUDE 'budgets-admin-search.inc' %]
119 <!-- ################################################################################# -->
121 <!-- ################################################################################# -->
123 <div id="breadcrumbs">
124 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
125 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
127 <!-- add or modify a budget period -->
128 <!-- ####################################### -->
129 [% IF ( add_form ) %]
130 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
131 [% IF ( budget_period_id ) %]
132 Modify budget [% budget_period_description %]
139 <!-- delete a budget period -->
140 <!-- ################################ -->
141 [% IF ( delete_confirm ) %]
142 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
144 Cannot delete budget '[% budget_period_description %]'
146 Delete budget '[% budget_period_description %]'?
149 <!-- duplicate a budget -->
150 [% IF ( duplicate_form ) %]
151 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
153 <!-- display budget periods list -->
154 <!-- ########################################## -->
156 Budgets administration
160 <div id="doc3" class="yui-t2">
165 [% INCLUDE 'budgets-admin-toolbar.inc' %]
167 [% IF ( duplicate_form ) %]
168 <h3>Duplicate budget</h3>
169 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
170 <fieldset class="rows">
171 <input type="hidden" name="op" value="duplicate_budget" />
172 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
177 <label class="required" for="from">Start date: </label>
178 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
179 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
183 <label class="required" for="to">End date: </label>
184 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
185 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
191 <fieldset class="action">
192 <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>
199 [% IF ( add_form ) %]
200 <!-- add or modify a budget period -->
202 [% IF ( budget_period_id ) %]
203 <h3>Modify budget</h3>
207 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
208 <fieldset class="rows">
209 <!-- ################################################################################# -->
210 <!-- display information about the budget period that must be added or modified -->
211 <!-- ################################################################################# -->
212 <input type="hidden" name="op" value="add_validate" />
213 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
216 <label class="required" for="from">Start date: </label>
217 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
218 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
222 <label class="required" for="to">End date: </label>
223 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="datepickerto" />
224 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
229 <!-- ############################## -->
230 <label class="required" for="budget_period_description">Description: </label>
231 <input type="text" id="budget_period_description" name="budget_period_description"
232 size="48" maxlength="80" value="[% budget_period_description %]" />
237 <!-- ############################## -->
238 <label for="budget_period_total">Total amount: </label>
239 <input type="text" id="budget_period_total" name="budget_period_total"
240 size="10" maxlength="80" value="[% budget_period_total %]" />
245 <!-- ############################## -->
246 <label for="budget_period_active">Make budget active: </label>
247 [% 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 %]
252 <!-- ############################## -->
253 <label for="budget_period_locked">Lock budget: </label>
254 [% 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 %]
259 <fieldset class="action">
260 <!-- "save changes" button -->
261 <!-- ###################################### -->
262 <input type="button" value="Save changes" onclick="Check(this.form)" />
263 <!-- <input type="submit" value="Save Changes" /> -->
264 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
271 <!-- ####################################################################### -->
272 <!-- delete a budget period -->
273 <!-- ####################################################################### -->
275 [% IF ( delete_confirm ) %]
277 <div class="dialog message">
278 <h3>Cannot delete budget</h3>
279 <p><strong>This record is used [% total %] times</strong>
280 . Deletion is not possible.</p>
282 <div class="dialog alert">
283 <h3>Delete budget '[% budget_period_description %]'?</h3>
286 <!-- ############################################################# -->
287 <!-- "delete" and "cancel" buttons -->
288 <!-- ############################################################# -->
290 <form action="[% script_name %]" method="post">
291 <input type="hidden" name="op" value="delete_confirmed" />
292 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
293 <input type="submit" class="approve" value="Delete" />
296 <form action="[% script_name %]" method="post">
297 <input type="submit" class="deny" value="Cancel" />
302 <!-- DEFAULT display budget periods list -->
304 <h2>Budgets administration</h2>
306 [% INCLUDE 'budgets-active-currency.inc' %]
308 <div id="budgetsTabs" class="toptabs">
310 <li><a href="#active">Active budgets</a></li>
311 <li><a href="#inactive">Inactive budgets</a></li>
315 [% IF ( period_active_loop ) %]
316 <table id="activeperiodst">
320 <th class="title-string">Start date</th>
321 <th class="title-string">End date</th>
328 [% FOREACH period_active IN period_active_loop %]
330 <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>
331 <td><span title="[% period_active.budget_period_startdate %]">[% period_active.budget_period_startdate | $KohaDates %]</span></td>
332 <td><span title="[% period_active.budget_period_enddate %]">[% period_active.budget_period_enddate | $KohaDates %]</span></td>
334 [% IF ( period_active.budget_period_locked ) %]
335 <span style="color:green;">Locked</span>
338 <td class="data">[% period_active.budget_period_total %]</td>
340 <a href="[% script_name %]?op=add_form&budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
341 <a href="[% script_name %]?op=delete_confirm&budget_period_id=[% period_active.budget_period_id %]">Delete</a>
342 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
351 <div class="paginationBar">[% active_pagination_bar %]</div>
354 [% IF ( period_inactive_loop ) %]
355 <table id="inactiveperiodst">
359 <th class="title-string">Start date</th>
360 <th class="title-string">End date</th>
367 [% FOREACH period_loo IN period_inactive_loop %]
368 [% IF ( loop.odd ) %]
371 <tr class="highlight">
373 <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>
374 <td><span title="[% period_loo.budget_period_startdate %]">[% period_loo.budget_period_startdate | $KohaDates %]</span></td>
375 <td><span title="[% period_loo.budget_period_enddate %]">[% period_loo.budget_period_enddate | $KohaDates %]</span></td>
376 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
377 <td class="data">[% period_loo.budget_period_total %]</td>
379 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
380 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
381 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
390 <div class="pages">[% inactive_pagination_bar %]</div>
399 [% INCLUDE 'acquisitions-menu.inc' %]
403 [% INCLUDE 'intranet-bottom.inc' %]