1 [% INCLUDE 'doc-head-open.inc' %]
2 [% INCLUDE 'doc-head-close.inc' %]
3 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7 <script type="text/javascript">
8 // #################################################################################
10 // #################################################################################
11 function CheckDuplicateForm(f){
15 if(!(isNotNull(f.budget_period_startdate,1))){
16 _alertString += "\n- " + _("Start date missing");
18 if (!(isNotNull(f.budget_period_enddate,1))){
19 _alertString += "\n- " + _("End date missing");
21 if( f.budget_period_startdate > f.budget_period_enddate ) {
22 _alertString += "\n- " + _("Start date must be before end date");
25 if(_alertString.length==0){
28 alertString += _("Form not submitted because of the following problem(s)");
29 alertString += "\n-----------------------------------------\n";
30 alertString += _alertString;
39 if (!(isNotNull(f.budget_period_startdate,1))) {
40 _alertString += "\n- " + _("Start date missing");
43 if (!(isNotNull(f.budget_period_enddate,1))) {
44 _alertString += "\n- " + _("End date missing");
47 if ( f.budget_period_startdate > f.budget_period_enddate ) {
48 _alertString += "\n- " + _("Start date must be before end date");
51 if (!(isNotNull(f.budget_period_description,1))) {
52 _alertString += "\n- " + _("Description missing");
55 if (!(isNum(f.budget_period_total))) {
56 _alertString += "\n- " + _("Amount must be a valid number, or empty");
64 if (_alertString.length==0) {
67 alertString2 = _("Form not submitted because of the following problem(s)");
68 alertString2 += "\n------------------------------------------------------------------------------------\n";
69 alertString2 += _alertString;
73 $(document).ready(function() {
74 $("#periodsh").tablesorter({
77 headers: {6:{sorter:false}}
83 Koha › Administration › Budgets
85 [% IF ( add_form ) %]›
86 [% IF ( budget_period_id ) %]
87 Modify budget'[% budget_period_id %]'
92 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
93 [% IF ( delete_confirm ) %]›
94 Delete budget '[% budget_period_description %]'?
96 [% IF ( delete_confirmed ) %]›
104 <body id="admin_aqbudgetperiods" class="admin">
106 [% INCLUDE 'header.inc' %]
107 [% INCLUDE 'budgets-admin-search.inc' %]
109 <!-- ################################################################################# -->
111 <!-- ################################################################################# -->
113 <div id="breadcrumbs">
114 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
115 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
117 <!-- add or modify a budget period -->
118 <!-- ####################################### -->
119 [% IF ( add_form ) %]
120 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
121 [% IF ( budget_period_id ) %]
122 Modify budget [% budget_period_description %]
129 <!-- delete a budget period -->
130 <!-- ################################ -->
131 [% IF ( delete_confirm ) %]
132 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
134 Cannot delete budget '[% budget_period_description %]'
136 Delete budget '[% budget_period_description %]'?
139 <!-- duplicate a budget -->
140 [% IF ( duplicate_form ) %]
141 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
143 <!-- display budget periods list -->
144 <!-- ########################################## -->
146 Budgets administration
150 <div id="doc3" class="yui-t2">
155 [% INCLUDE 'budgets-admin-toolbar.inc' %]
157 [% IF ( duplicate_form ) %]
158 <h3>Duplicate budget</h3>
159 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
160 <fieldset class="rows">
161 <input type="hidden" name="op" value="duplicate_budget" />
162 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
167 <label class="required" for="budget_period_startdate">Start date</label>
168 <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate" value="[% budget_period_startdate %]" />
169 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
170 <script type="text/javascript">
172 inputField : "budget_period_startdate",
173 ifFormat : "[% DHTMLcalendar_dateformat %]",
174 button : "openCalendarFrom",
179 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
183 <label class="required" for="budget_period_enddate">End date</label>
184 <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
185 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
187 <script type="text/javascript">
189 inputField : "budget_period_enddate",
190 ifFormat : "[% DHTMLcalendar_dateformat %]",
191 button : "openCalendarTo",
195 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
201 <fieldset class="action">
202 <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>
209 [% IF ( add_form ) %]
210 <!-- add or modify a budget period -->
212 [% IF ( budget_period_id ) %]
213 <h3>Modify budget</h3>
217 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
218 <fieldset class="rows">
219 <!-- ################################################################################# -->
220 <!-- display information about the budget period that must be added or modified -->
221 <!-- ################################################################################# -->
222 <input type="hidden" name="op" value="add_validate" />
223 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
226 <label class="required" for="budget_period_startdate">Start date</label>
227 <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate" value="[% budget_period_startdate %]" />
228 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
229 <script type="text/javascript">
231 inputField : "budget_period_startdate",
232 ifFormat : "[% DHTMLcalendar_dateformat %]",
233 button : "openCalendarFrom",
238 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
242 <label class="required" for="budget_period_enddate">End date</label>
243 <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
244 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
246 <script type="text/javascript">
248 inputField : "budget_period_enddate",
249 ifFormat : "[% DHTMLcalendar_dateformat %]",
250 button : "openCalendarTo",
254 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
259 <!-- ############################## -->
260 <label class="required" for="budget_period_description">Description</label>
261 <input type="text" id="budget_period_description" name="budget_period_description"
262 size="48" maxlength="80" value="[% budget_period_description %]" />
267 <!-- ############################## -->
268 <label for="budget_period_total">Total amount</label>
269 <input type="text" id="budget_period_total" name="budget_period_total"
270 size="10" maxlength="80" value="[% budget_period_total %]" />
275 <!-- ############################## -->
276 <label for="budget_period_active">Make budget active</label>
277 [% 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 %]
282 <!-- ############################## -->
283 <label for="budget_period_locked">Lock budget</label>
284 [% 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 %]
289 <fieldset class="action">
290 <!-- "save changes" button -->
291 <!-- ###################################### -->
292 <input type="button" value="Save changes" onclick="Check(this.form)" />
293 <!-- <input type="submit" value="Save Changes" /> -->
294 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
301 <!-- ####################################################################### -->
302 <!-- delete a budget period -->
303 <!-- ####################################################################### -->
305 [% IF ( delete_confirm ) %]
307 <div class="dialog message">
308 <h3>Cannot delete budget</h3>
309 <p><strong>This record is used [% total %] times</strong>
310 . Deletion is not possible.</p>
312 <div class="dialog alert">
313 <h3>Delete budget '[% budget_period_description %]'?</h3>
316 <!-- ############################################################# -->
317 <!-- "delete" and "cancel" buttons -->
318 <!-- ############################################################# -->
320 <form action="[% script_name %]" method="post">
321 <input type="hidden" name="op" value="delete_confirmed" />
322 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
323 <input type="submit" class="approve" value="Delete" />
326 <form action="[% script_name %]" method="post">
327 <input type="submit" class="deny" value="Cancel" />
332 <!-- DEFAULT display budget periods list -->
334 <h2>Budgets administration</h2>
336 [% INCLUDE 'budgets-active-currency.inc' %]
338 <table id="periodsh">
351 [% FOREACH period_loo IN period_loop %]
352 [% IF ( loop.odd ) %]
355 <tr class="highlight">
357 <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>
358 <td>[% period_loo.budget_period_startdate %]</td>
359 <td>[% period_loo.budget_period_enddate %]</td>
360 <td>[% IF ( period_loo.budget_period_active ) %]<span style="color:green;">Active</span> [% ELSE %][% END %] </td>
361 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
362 <td align='right'>[% period_loo.budget_period_total %]</td>
364 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
365 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
366 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
370 [% UNLESS ( period_loop ) %]
371 <tr><td colspan="7">No budget</td></tr>
375 <div class="pages">[% pagination_bar %]</div>
382 [% INCLUDE 'acquisitions-menu.inc' %]
386 [% INCLUDE 'intranet-bottom.inc' %]