1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 Koha -- System Administration: Budgets
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <!-- Additions to enable Calendar system -->
6 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
7 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
8 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
9 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
10 <!-- End of additions -->
12 <!-- TMPL_INCLUDE NAME="menus.inc" -->
13 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
15 <ul id="_informations">
16 <!-- TMPL_IF NAME="add_validate" -->
17 <li>Budget Data Recorded, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li>
18 <!-- /TMPL_IF --> <!-- add_validate -->
20 <!-- TMPL_IF name="delete_confirmed" -->
21 <li>Budget deleted, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li>
22 <!-- /TMPL_IF --> <!-- delete_confirmed -->
25 <!-- TMPL_IF name="else" -->
34 <th>Budget amount</th>
38 <form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
41 <select name="filter_bookfundid">
42 <option value="">----</option>
43 <!-- TMPL_LOOP name="filter_bookfundids" -->
44 <!-- TMPL_IF NAME="selected" -->
45 <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
47 <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
53 <select name="filter_branchcode">
54 <option value="">----</option>
55 <!-- TMPL_LOOP name="filter_branches" -->
56 <!-- TMPL_IF NAME="selected" -->
57 <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
59 <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
65 <select name="filter_startdate_sign">
66 <!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
67 <option value="=" selected="selected">=</option>
69 <option value="=">=</option>
72 <!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
73 <option value=">=" selected="selected">>=</option>
75 <option value=">=">>=</option>
78 <!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
79 <option value="<=" selected="selected"><=</option>
81 <option value="<="><=</option>
84 <input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
85 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="filter_startdate_button" />
86 <script language="JavaScript" type="text/javascript">
89 inputField : "filter_startdate",
90 ifFormat : "%Y-%m-%d",
91 button : "filter_startdate_button"
97 <select name="filter_enddate_sign">
98 <!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
99 <option value="=" selected="selected">=</option>
101 <option value="=">=</option>
104 <!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
105 <option value=">=" selected="selected">>=</option>
107 <option value=">=">>=</option>
110 <!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
111 <option value="<=" selected="selected"><=</option>
113 <option value="<="><=</option>
116 <input type="text" size="8" maxlength="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
117 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="filter_enddate_button" />
118 <script language="JavaScript" type="text/javascript">
121 inputField : "filter_enddate",
122 ifFormat :"%Y-%m-%d",
123 button : "filter_enddate_button"
129 <select name="filter_amount_sign">
130 <!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
131 <option value="=" selected="selected">=</option>
133 <option value="=">=</option>
136 <!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
137 <option value=">=" selected="selected">>=</option>
139 <option value=">=">>=</option>
142 <!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
143 <option value="<=" selected="selected"><=</option>
145 <option value="<="><=</option>
148 <input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8"/>
151 <input type="submit" name="filter" value="Filter" />
156 <!-- TMPL_LOOP name="budget" -->
157 <!-- TMPL_IF NAME="toggle" -->
158 <tr class="highlight">
162 <td><!-- TMPL_VAR NAME="bookfundid" --></td>
163 <td><!-- TMPL_VAR NAME="branchname" --></td>
164 <td><!-- TMPL_VAR NAME="startdate" --></td>
165 <td><!-- TMPL_VAR NAME="enddate" --></td>
166 <td><!-- TMPL_VAR NAME="budgetamount" --></td>
168 <a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a>
169 <a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
172 <!-- /TMPL_LOOP --> <!-- budget -->
174 <a href="aqbookfund.pl?op=add_form">Add bookfund</a>
175 <a href="aqbudget.pl">Show all budgets</a>
179 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
180 <!-- /TMPL_IF --> <!-- else -->
182 <!-- TMPL_IF name="add_form" -->
183 <script language="JavaScript" type="text/javascript">
185 function isNotNull(f,noalert) {
186 if (f.value.length ==0) {
193 var x=f.value.toUpperCase();
198 function isNum(v,maybenull) {
199 var n = new Number(v.value);
203 if (maybenull==0 && v.value=='') {
210 var t = Date.parse(f.value);
220 if (f.bookfundid.value.length==0) {
221 _alertString += "- bookfundid missing\n";
223 if (!(isNotNull(window.document.Aform.budgetamount,1))) {
224 _alertString += "- Budget missing\n";
226 if (_alertString.length==0) {
227 document.Aform.submit();
229 alertString2 = "Form not submitted because of the following problem(s)\n";
230 alertString2 += "------------------------------------------------------------------------------------\n\n";
231 alertString2 += _alertString;
237 <form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
239 <legend>Add budget</legend>
240 <input type="hidden" name="op" value="add_validate" />
241 <input type="hidden" name="checked" value="0" />
247 <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
248 <!-- TMPL_VAR NAME="bookfundname" -->
254 <label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
257 <input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
258 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="startdate_button" />
259 <script language="JavaScript" type="text/javascript">
262 inputField : "startdate",
263 ifFormat : "%Y-%m-%d",
264 button : "startdate_button"
272 <label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
275 <input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
276 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="enddate_button" />
277 <script language="JavaScript" type="text/javascript">
280 inputField : "enddate",
281 ifFormat : "%Y-%m-%d",
282 button : "enddate_button"
290 <label for="budgetamount">Budget amount</label>
293 <input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
298 <label for="branch">Branch</label>
301 <!-- TMPL_IF NAME="disable_branchselection" -->
302 <!-- Pierrick's note: I've found that a disabled select was not -->
303 <!-- giving its value to Perl :-/ So I use a hidden field trick -->
304 <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
305 <select name="branch" disabled="disabled">
307 <select name="branch">
310 <option value="">----</option>
311 <!-- TMPL_LOOP NAME="branches" -->
312 <!-- TMPL_IF NAME="selected" -->
313 <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
315 <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
323 <!-- TMPL_IF NAME="aqbudgetid" -->
324 <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
328 <input type="button" value="Submit" onclick="Check(this.form)" />
329 <input type="submit" value="Cancel" onclick="location.href='/cgi-bin/koha/admin/aqbudget.pl'; return false;" />
333 <!-- /TMPL_IF --> <!-- add_form -->
335 <!-- TMPL_IF name="delete_confirm" -->
336 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
338 <legend>Delete Book Budget?</legend>
343 <td><!-- TMPL_VAR NAME="startdate" --></td>
348 <td><!-- TMPL_VAR NAME="enddate" --></td>
352 <th>Budget Amount</th>
353 <td><!-- TMPL_VAR NAME="budgetamount" --></td>
357 <input type="hidden" name="op" value="delete_confirmed" />
358 <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
361 <input type="submit" value="Delete this budget" />
362 <input type="submit" value="Do Not Delete" />
368 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->