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 %]'
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 %]'?
140 <!-- display budget periods list -->
141 <!-- ########################################## -->
143 Budgets administration
147 <div id="doc3" class="yui-t2">
152 [% INCLUDE 'budgets-admin-toolbar.inc' %]
154 [% IF ( duplicate_form ) %]
155 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
156 <fieldset class="rows">
157 <input type="hidden" name="op" value="duplicate_budget" />
158 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
163 <label class="required" for="budget_period_startdate">Start date</label>
164 <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate" value="[% budget_period_startdate %]" />
165 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
166 <script type="text/javascript">
168 inputField : "budget_period_startdate",
169 ifFormat : "[% DHTMLcalendar_dateformat %]",
170 button : "openCalendarFrom",
175 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
179 <label class="required" for="budget_period_enddate">End date</label>
180 <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
181 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
183 <script type="text/javascript">
185 inputField : "budget_period_enddate",
186 ifFormat : "[% DHTMLcalendar_dateformat %]",
187 button : "openCalendarTo",
191 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
197 <fieldset class="action">
198 <input type="button" value="Save Changes" onclick="CheckDuplicateForm(this.form)" />
205 [% IF ( add_form ) %]
206 <!-- add or modify a budget period -->
208 [% IF ( budget_period_id ) %]
209 <h3>Modify budget</h3>
213 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
214 <fieldset class="rows">
215 <!-- ################################################################################# -->
216 <!-- display information about the budget period that must be added or modified -->
217 <!-- ################################################################################# -->
218 <input type="hidden" name="op" value="add_validate" />
219 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
222 <label class="required" for="budget_period_startdate">Start date</label>
223 <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate" value="[% budget_period_startdate %]" />
224 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
225 <script type="text/javascript">
227 inputField : "budget_period_startdate",
228 ifFormat : "[% DHTMLcalendar_dateformat %]",
229 button : "openCalendarFrom",
234 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
238 <label class="required" for="budget_period_enddate">End date</label>
239 <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
240 <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
242 <script type="text/javascript">
244 inputField : "budget_period_enddate",
245 ifFormat : "[% DHTMLcalendar_dateformat %]",
246 button : "openCalendarTo",
250 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
255 <!-- ############################## -->
256 <label class="required" for="budget_period_description">Description</label>
257 <input type="text" id="budget_period_description" name="budget_period_description"
258 size="48" maxlength="80" value="[% budget_period_description %]" />
263 <!-- ############################## -->
264 <label for="budget_period_total">Total amount</label>
265 <input type="text" id="budget_period_total" name="budget_period_total"
266 size="10" maxlength="80" value="[% budget_period_total %]" />
271 <!-- ############################## -->
272 <label for="budget_period_active">Make Budget Active</label>
273 [% 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 %]
278 <!-- ############################## -->
279 <label for="budget_period_locked">Lock Budget</label>
280 [% 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 %]
285 <fieldset class="action">
286 <!-- "save changes" button -->
287 <!-- ###################################### -->
288 <input type="button" value="Save Changes" onclick="Check(this.form)" />
289 <!-- <input type="submit" value="Save Changes" /> -->
290 <!-- <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl" class="cancel">Cancel</a> -->
297 <!-- ####################################################################### -->
298 <!-- delete a budget period -->
299 <!-- ####################################################################### -->
301 [% IF ( delete_confirm ) %]
303 <div class="dialog message">
304 <h3>Cannot delete budget</h3>
305 <p><strong>This record is used [% total %] times</strong>
306 . Deletion is not possible.</p>
308 <div class="dialog alert">
309 <h3>Delete budget '[% budget_period_description %]'?</h3>
312 <!-- ############################################################# -->
313 <!-- "delete" and "cancel" buttons -->
314 <!-- ############################################################# -->
316 <form action="[% script_name %]" method="post">
317 <input type="hidden" name="op" value="delete_confirmed" />
318 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
319 <input type="submit" class="approve" value="Delete" />
322 <form action="[% script_name %]" method="post">
323 <input type="submit" class="deny" value="Cancel" />
328 <!-- DEFAULT display budget periods list -->
330 <h2>Budgets administration</h2>
332 [% INCLUDE 'budgets-active-currency.inc' %]
334 <table id="periodsh">
347 [% FOREACH period_loo IN period_loop %]
348 [% IF ( loop.odd ) %]
351 <tr class="highlight">
353 <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>
354 <td>[% period_loo.budget_period_startdate %]</td>
355 <td>[% period_loo.budget_period_enddate %]</td>
356 <td>[% IF ( period_loo.budget_period_active ) %]<span style="color:green;">Active</span> [% ELSE %][% END %] </td>
357 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
358 <td align='right'>[% period_loo.budget_period_total %]</td>
360 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
361 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
362 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add Fund</a>
366 [% UNLESS ( period_loop ) %]
367 <tr><td colspan="7">No budget</td></tr>
371 <div class="pages">[% pagination_bar %]</div>
378 [% INCLUDE 'acquisitions-menu.inc' %]
382 [% INCLUDE 'intranet-bottom.inc' %]