1 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
3 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
5 <!-- TMPL_IF name="add_form" -->
6 <script type="text/javascript">
12 function ownerRemove(f) {
13 document.getElementById('budget_owner_name').innerHTML = '';
23 if (!(isNotNull(f.budget_code,1))) {
24 _alertString += _("- Budget code missing\n");
27 if (!(isNotNull(f.budget_name,1))) {
28 _alertString += _("- Budget name missing\n");
32 if (typeof(f.budget_id ) != "undefined") {
33 budgetId = f.budget_id.value
38 // hack to test if selected parent_id in scrolling-list...
39 // if value == 'undef' its got a selected_parent :/
40 if(f.budget_parent_id){
41 var chkAdd = f.budget_parent_id.value ;
42 if ( typeof(chkAdd ) != "undefined") {
43 newBudgetParent = f.budget_parent_id.value
45 newBudgetParent = f.budget_parent_id.item(0).value
48 if (budgetId > 0) { ; //its a mod ...
49 // if parent eq curent-budget, fail...
50 if ( newBudgetParent == budgetId ) {
51 _alertString += _("- Budget parent is current budget\n");
54 else if (newBudgetParent) {
55 var result = checkBudgetParent( budgetId , newBudgetParent );
57 _alertString += result;
64 var budgetTotal = Math.abs(f.budget_amount.value);
65 var result = budgetExceedsParent (budgetTotal, budgetId, newBudgetParent, f.budget_period_id.value)
67 _alertString += result;
70 if (_alertString.length==0) {
71 document.Aform.submit();
73 alertString2 = _("Form not submitted because of the following problem(s)\n");
74 alertString2 += "------------------------------------------------------------------------------------\n\n";
75 alertString2 += _alertString;
82 <link href="<!-- TMPL_VAR NAME='themelang' -->/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
84 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
85 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/lib/jquery/plugins/treetable/jquery.treeTable.min.js"></script>
86 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/lib/jquery/plugins/jquery.qtip.js"></script>
88 <script type="text/javascript">
91 $(document).ready(function() {
93 $('.tooltiped').each(function (){
94 contentelem = $(this).children().filter('.tooltipcontent');
96 content: contentelem.html(),
110 tooltip: 'bottomRight'
115 $('.tooltipcontent').each(function (){
118 <!-- TMPL_IF NAME="notree" -->
119 $("#budgeth").tablesorter({
124 $("#budgeth").treeTable();
133 <!-- TMPL_INCLUDE NAME="header.inc" -->
134 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
136 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
137 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
138 <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> › <!-- TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --> <!-- TMPL_IF name="delete_confirm" -->
139 <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> › Delete Budget?<!-- /TMPL_IF --></div>
141 <div id="doc3" class="yui-t2">
146 <!-- TMPL_INCLUDE NAME="budgets-admin.inc" -->
147 <!-- TMPL_IF name="else" -->
149 <h1>Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
150 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name= 'budget_period_id' -->" />
151 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
153 <legend>Budget filters</legend>
156 <label for="filter_budgetbranch">Library: </label>
157 <select name="filter_budgetbranch" id="filter_budgetbranch" style="width:10em;">
158 <option value=""></option>
159 <!-- TMPL_LOOP name="branchloop" -->
160 <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
165 <!-- TMPL_IF NAME="show_mine" -->
166 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
168 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
170 <label for="show_mine">Show my budgets only</label>
174 <input type="hidden" name="show" value="1" >
175 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
176 <input type="submit" class="submit" name="filter" value="Select" />
183 <th>Budget hierarchy</th>
185 <th>Total<br />allocated</th>
186 <th>Base-level<br />allocated</th>
187 <th>Base-level<br />spent</th>
188 <th>Base-level<br />remaining</th>
189 <th class="tooltipcontent"> </th>
193 <th colspan="3">Actions</th>
197 <!-- TMPL_IF NAME="budget" -->
198 <!-- TMPL_LOOP name="budget" -->
199 <!-- TMPL_IF NAME="toggle" -->
200 <tr id="node-<!-- TMPL_VAR NAME="budget_id" -->" class="highlight<!-- TMPL_IF NAME="budget_parent_id" --> child-of-node-<!-- TMPL_VAR NAME="budget_parent_id" --><!-- /TMPL_IF --> tooltiped">
202 <tr id="node-<!-- TMPL_VAR NAME="budget_id" -->" class="tooltiped <!-- TMPL_IF NAME="budget_parent_id" --> child-of-node-<!-- TMPL_VAR NAME="budget_parent_id" --><!-- /TMPL_IF -->">
205 <td><!-- TMPL_VAR NAME="budget_code_indent" --></td>
206 <td><!-- TMPL_VAR NAME="budget_name" --></td>
207 <td align='right'><!-- TMPL_VAR NAME="budget_amount_total" --></td>
208 <td align='right'><!-- TMPL_VAR NAME="budget_amount" --> </td>
209 <td align='right'><!-- TMPL_VAR NAME="budget_spent" --> </td>
211 <!-- TMPL_IF NAME="remaining_pos" --> STYLE="color: green;" <!-- /TMPL_IF -->
212 <!-- TMPL_IF NAME="remaining_neg" --> STYLE="color: red;" <!-- /TMPL_IF --> >
213 <!-- TMPL_VAR NAME="budget_remaining" --> </td>
215 <td class="tooltipcontent">
216 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a>
217 <!-- TMPL_VAR NAME="budget_branchcode" -->
218 <!-- TMPL_VAR NAME="budget_notes" -->
220 <!-- TMPL_IF NAME='budget_lock'-->
221 <td colspan="3"> <span STYLE="color: gray;" > Edit Delete </span> </td>
224 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=<!-- TMPL_VAR NAME="budget_id" -->&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" >Edit</a>
225 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=delete_confirm&budget_id=<!-- TMPL_VAR NAME="budget_id" -->&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Delete</a>
226 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_parent_id=<!-- TMPL_VAR NAME="budget_id" -->&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Add Sub-Budget</a>
232 <tr><td colspan="12">No budget found</td></tr>
237 <th colspan='2' style='text-align: left;' nowrap>Period allocated <!--TMPL_IF NAME="budget_period_total" --><!-- TMPL_VAR NAME='budget_period_total'--><!-- /TMPL_IF --> </th>
238 <th nowrap style='text-align: right;' > <!-- TMPL_VAR NAME='period_alloc_total'--></th>
239 <th nowrap style='text-align: right;'> <!-- TMPL_VAR NAME='base_alloc_total'--></th>
240 <th style='text-align: right;' ><!-- TMPL_VAR NAME='base_spent_total'--></th>
241 <th style='text-align: right;' ><!-- TMPL_VAR NAME='base_remaining_total'--></th>
242 <th class="tooltipcontent"></th>
243 <th colspan="3"></th>
248 <span><b>Currency = <!-- TMPL_VAR NAME="cur" --> <!-- TMPL_VAR NAME="cur_format" --></b></span><br>
249 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
250 <!-- /TMPL_IF --> <!-- else -->
252 <!-- ********************************************************************************************** -->
253 <!-- create add/mod entry form -->
254 <!-- TMPL_IF name="add_form" -->
256 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
257 <fieldset class="rows">
258 <legend><!-- TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget
259 <!-- TMPL_IF NAME="budget_period_description" -->
260 <!-- TMPL_VAR NAME="budget_name" --> for period <!-- TMPL_VAR NAME="budget_period_description" -->
264 <input type="hidden" name="op" value="add_validate" />
265 <input type="hidden" name="checked" value="0" />
267 <!-- TMPL_IF NAME="budget_parent_id" -->
269 <label for="budget_parent_id">Budget Parent: </label>
270 <!-- TMPL_VAR NAME="budget_parent_name" -->
271 <input type="hidden" name="budget_parent_id" value="<!-- TMPL_VAR NAME="budget_parent_id" -->" />
275 <label style="color: red;" for="budget_code">Budget Code: </label>
276 <input type="text" name="budget_code" id="budget_code" value="<!-- TMPL_VAR NAME="budget_code" -->" size="30" />
280 <label style="color: red;" for="budget_name">Budget Name: </label>
281 <input type="text" name="budget_name" id="budget_name" value="<!-- TMPL_VAR NAME="budget_name" -->" size="60" />
284 <div class='hint'>budget amount cannot both be empty</div>
286 <label style='white-space: nowrap;' for="budget_amount">Amount: </label>
287 <input type="text" name="budget_amount" id="budget_amount" value="<!-- TMPL_VAR NAME="budget_amount" -->" size="8" />
291 <label for="">Encumbrance: </label>
292 <input type="text" name="budget_encumb" id="budget_encumb" value="<!-- TMPL_VAR NAME="budget_encumb" -->" size="8" />
296 <label for="">Expenditure: </label>
297 <input type="text" name="budget_expend" id="budget_expend" value="<!-- TMPL_VAR NAME="budget_expend" -->" size="8" />
300 <input type="hidden" name="budget_owner_id" id="budget_owner_id" value='<!-- TMPL_VAR NAME="budget_owner_id" -->' />
302 <label for="parents">Owner: </label>
303 <span id="budget_owner_name">
304 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a>
307 <!-- FIXME: hardcoded button positions :/ -->
308 <input style="position:absolute; left:600px;" type="button" id="patron_search" value="Edit owner" onclick="ownerPopup(); return false;" />
309 <input style="position:absolute; left:680px;" type="button" id="patron_search" value="Remove owner" onclick="ownerRemove(this.form); return false;" />
316 <label for="branch">Library: </label>
317 <select name="budget_branchcode">
318 <option value=""></option>
319 <!-- TMPL_LOOP name="branchloop_select" -->
320 <!-- TMPL_IF name="selected" --> <option value="<!-- TMPL_VAR name="value" -->" > <!--TMPL_ELSE--> <option value="<!-- TMPL_VAR name="value" -->" selected="selected"> <!-- /TMPL_IF --> <!-- TMPL_VAR name="branchname" --></option>
326 <label for="branch">Restrict access to: </label>
327 <!-- TMPL_VAR name="budget_perm_dropbox" -->
331 <label for="">Notes: </label>
332 <textarea name="budget_notes" id="budget_notes" cols="80" rows="6" ><!-- TMPL_VAR NAME='budget_notes' --></textarea>
336 <label style='white-space: nowrap;' for="parents">Planning Category1: </label>
337 <select name="sort1_authcat" id="authorised_value_category1">
338 <option value=""></option>
339 <!-- TMPL_LOOP name="authorised_value_categories1" -->
340 <!-- TMPL_IF name="selected" -->
341 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
342 <!-- TMPL_VAR name="category" -->
345 <option value="<!-- TMPL_VAR name="category" -->">
346 <!-- TMPL_VAR name="category" -->
353 <label style='white-space: nowrap;' for="parents">Planning Category2: </label>
354 <select name="sort2_authcat" id="authorised_value_category2">
355 <option value=""></option>
356 <!-- TMPL_LOOP name="authorised_value_categories2" -->
357 <!-- TMPL_IF name="selected" -->
358 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
359 <!-- TMPL_VAR name="category" -->
362 <option value="<!-- TMPL_VAR name="category" -->">
363 <!-- TMPL_VAR name="category" -->
371 <!-- TMPL_IF NAME="budget_id" -->
372 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME='budget_id' -->" />
376 <fieldset class="action">
377 <input type="submit" value="Submit" onclick="javascript:Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
378 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name='budget_period_id' -->" />
382 <!-- /TMPL_IF --> <!-- add_form -->
384 <!-- TMPL_IF name="delete_confirm" -->
385 <div class="dialog alert"> <h3>Delete Budget <!-- TMPL_VAR NAME="budget_name" -->?</h3>
388 <th scope="row">Budget Amount:</td>
389 <td><!-- TMPL_VAR NAME="budget_amount" --></td>
393 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
394 <input type="hidden" name="op" value="delete_confirmed" />
395 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
396 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
397 <input type="submit" value="Delete this budget" class="approve" />
400 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
401 <input type="submit" class="deny" value="No, Do Not Delete" />
409 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
412 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->