1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Administration › Funds<!-- TMPL_IF name="add_form" --> › <!--TMPL_IF NAME="budget_id" -->Modify Fund<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add Fund <!-- /TMPL_IF --><!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/acq.js"></script>
6 <!-- TMPL_IF name="add_form" -->
7 <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 cannot be blank") + "\n";
27 if (!(isNotNull(f.budget_name,1))) {
28 _alertString += _("- Budget name cannot be blank") + "\n";
31 if (!(isNotNull(f.budget_amount,1))) {
32 _alertString += _("- Budget amount cannot be blank") + "\n";
36 if (typeof(f.budget_id ) != "undefined") {
37 budgetId = f.budget_id.value
42 // hack to test if selected parent_id in scrolling-list...
43 // if value == 'undef' its got a selected_parent :/
44 if(f.budget_parent_id){
45 var chkAdd = f.budget_parent_id.value ;
46 if ( typeof(chkAdd ) != "undefined") {
47 newBudgetParent = f.budget_parent_id.value
49 newBudgetParent = f.budget_parent_id.item(0).value
52 if (budgetId > 0) { ; //its a mod ...
53 // if parent eq curent-budget, fail...
54 if ( newBudgetParent == budgetId ) {
55 _alertString += _("- Budget parent is current budget") + "\n";
58 else if (newBudgetParent) {
59 var result = checkBudgetParent( budgetId , newBudgetParent );
61 _alertString += result;
68 var budgetTotal = Math.abs(f.budget_amount.value);
69 var result = budgetExceedsParent (budgetTotal, budgetId, newBudgetParent, f.budget_period_id.value)
71 _alertString += result;
74 if (_alertString.length==0) {
75 document.Aform.submit();
77 alertString2 = _("Form not submitted because of the following problem(s)");
78 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
79 alertString2 += _alertString;
86 <link href="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
88 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
89 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/treetable/jquery.treeTable.min.js"></script>
90 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.qtip.js"></script>
92 <script type="text/javascript">
95 $(document).ready(function() {
96 var tooltipcontent = $(".tooltipcontent");
97 tooltipcontent.hide();
99 $(".tooltiped td").each(function (){
100 contentelem = $(this).parent().children().filter(".tooltipcontent");
101 if(contentelem.html() != ""){
103 content: contentelem.html(),
117 tooltip: "bottomRight"
123 <!-- TMPL_IF NAME="notree" -->
124 $("#budgeth").tablesorter({
127 headers: { 7: { sorter: false }}
130 $("#budgeth").treeTable();
133 $("#filterbutton").click(function() {
134 $("#fundfilters").slideToggle(0);
135 $("#content").css({ marginLeft: $("#content").css("marginLeft") == "4em"?"15em":"4em"});
144 <!-- TMPL_INCLUDE NAME="header.inc" -->
145 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
147 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
148 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › <!-- TMPL_IF NAME="else" -->Funds for '<!-- TMPL_VAR name="budget_period_description" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
149 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Funds</a> › <!-- TMPL_IF NAME="budget_id" -->Modify fund<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add fund<!-- /TMPL_IF --><!-- /TMPL_IF --> <!-- TMPL_IF name="delete_confirm" -->
150 <a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a> › Delete fund?<!-- /TMPL_IF --></div>
152 <div id="doc3" class="yui-t2">
155 <div class="yui-b" id="content">
157 <!-- TMPL_UNLESS name="delete_confirm" --><!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" --><!-- /TMPL_UNLESS -->
158 <!-- TMPL_IF name="else" -->
160 <h1>Funds for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
162 <!-- TMPL_INCLUDE NAME="budgets-active-currency.inc" -->
169 <th>Total<br />allocated</th>
170 <th>Base-level<br />allocated</th>
171 <th>Base-level<br />spent</th>
172 <th>Total sublevels<br />spent</th>
173 <th>Base-level<br />remaining</th>
174 <th class="tooltipcontent"> </th>
180 <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated <!--TMPL_IF NAME="budget_period_total" --><!-- TMPL_VAR NAME="budget_period_total"--><!-- /TMPL_IF --> </th>
181 <th nowrap="nowrap" class="data"> <!-- TMPL_VAR NAME="period_alloc_total"--></th>
182 <th nowrap="nowrap" class="data"> <!-- TMPL_VAR NAME="base_alloc_total"--></th>
183 <th class="data"><!-- TMPL_VAR NAME="base_spent_total"--></th>
184 <th class="data"><!-- TMPL_VAR NAME="base_spent_total"--></th>
185 <th class="data"><!-- TMPL_VAR NAME="base_remaining_total"--></th>
186 <th class="tooltipcontent"></th>
191 <!-- TMPL_IF NAME="budget" -->
192 <!-- TMPL_LOOP name="budget" -->
193 <!-- TMPL_IF NAME="toggle" -->
194 <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">
196 <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 -->">
199 <td><!-- TMPL_VAR NAME="budget_code_indent" --></td>
200 <td><!-- TMPL_VAR NAME="budget_name" --></td>
201 <td class="data"><!-- TMPL_VAR NAME="budget_amount_total" --></td>
202 <td class="data"><!-- TMPL_VAR NAME="budget_amount" --> </td>
203 <td class="data"><!-- TMPL_VAR NAME="budget_spent" --> </td>
204 <td class="data"><!-- TMPL_VAR NAME="total_levels_spent" --></td>
205 <!-- TMPL_IF NAME="remaining_pos" -->
206 <td class="data" style="color: green;">
207 <!-- TMPL_ELSIF NAME="remaining_neg" -->
208 <td class="data" style="color: red;">
212 <!-- TMPL_VAR NAME="budget_remaining" --> </td>
214 <td class="tooltipcontent"><!-- TMPL_IF NAME="budget_owner_id" --><strong>Owner: </strong><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a><!-- /TMPL_IF -->
215 <!-- TMPL_IF NAME="budget_branchcode" --><br /><strong>Library: </strong><!-- TMPL_VAR NAME="budget_branchcode" --><!-- /TMPL_IF -->
216 <!-- TMPL_IF NAME="budget_notes" --><br /><strong>Notes: </strong><!-- TMPL_VAR NAME="budget_notes" --><!-- /TMPL_IF -->
217 <!-- TMPL_IF NAME="budget_hierarchy" -->
218 <ul class="budget_hierarchy"><!-- TMPL_LOOP name="budget_hierarchy" -->
219 <!-- TMPL_IF NAME="element_id" -->
220 <li><a href="?op=add_form&budget_id=<!-- TMPL_VAR NAME="element_id" -->&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->"><!-- TMPL_VAR NAME="element_name" --></a></li>
222 <li><strong><!-- TMPL_VAR NAME="element_name" --> : </strong></li>
226 <!-- /TMPL_IF --></td>
227 <!-- TMPL_IF NAME="budget_lock"-->
228 <td> <span style="color: gray;" > Edit Delete </span> </td>
231 <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>
232 <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>
233 <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 Child Fund</a>
239 <tr><td colspan="12">No fund found</td></tr>
244 <!-- TMPL_IF NAME="pagination_bar" --><div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div><!-- /TMPL_IF -->
245 <!-- /TMPL_IF --> <!-- else -->
247 <!-- ********************************************************************************************** -->
248 <!-- create add/mod entry form -->
249 <!-- TMPL_IF name="add_form" -->
251 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
252 <fieldset class="rows">
253 <legend><!-- TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Fund
254 <!-- TMPL_IF NAME="budget_period_description" -->
255 <!-- TMPL_VAR NAME="budget_name" --> for Budget '<!-- TMPL_VAR NAME="budget_period_description" -->'
259 <input type="hidden" name="op" value="add_validate" />
260 <input type="hidden" name="checked" value="0" />
262 <!-- TMPL_IF NAME="budget_parent_id" -->
264 <span class="label">Fund Parent: </span>
265 <!-- TMPL_VAR NAME="budget_parent_name" -->
266 <!-- TMPL_VAR NAME="budget_parent_id" --> - <!-- TMPL_VAR NAME="budget_parent_name" -->
267 <input type="hidden" name="budget_parent_id" value="<!-- TMPL_VAR NAME="budget_parent_id" -->" />
271 <label class="required" for="budget_code">Fund Code: </label>
272 <input type="text" name="budget_code" id="budget_code" value="<!-- TMPL_VAR NAME="budget_code" -->" size="30" />
276 <label class="required" for="budget_name">Fund Name: </label>
277 <input type="text" name="budget_name" id="budget_name" value="<!-- TMPL_VAR NAME="budget_name" -->" size="60" />
281 <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label>
282 <input type="text" name="budget_amount" id="budget_amount" value="<!-- TMPL_VAR NAME="budget_amount" -->" size="8" />
286 <label for="budget_encumb">Encumbrance: </label>
287 <input type="text" name="budget_encumb" id="budget_encumb" value="<!-- TMPL_VAR NAME="budget_encumb" -->" size="8" />
291 <label for="budget_expend">Expenditure: </label>
292 <input type="text" name="budget_expend" id="budget_expend" value="<!-- TMPL_VAR NAME="budget_expend" -->" size="8" /><input type="hidden" name="budget_owner_id" id="budget_owner_id" value="<!-- TMPL_VAR NAME="budget_owner_id" -->" />
296 <span class="label">Owner: </span>
297 <span id="budget_owner_name">
298 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a>
301 <!-- FIXME: hardcoded button positions :/ -->
302 <input style="" type="button" id="edit_owner" value="Edit owner" onclick="ownerPopup(); return false;" />
303 <input style="" type="button" id="remove_owner" value="Remove owner" onclick="ownerRemove(this.form); return false;" />
307 <label for="budget_branchcode">Library: </label>
308 <select name="budget_branchcode" id="budget_branchcode">
309 <option value=""></option>
310 <!-- TMPL_LOOP name="branchloop_select" -->
311 <!-- TMPL_UNLESS name="selected" --> <option value="<!-- TMPL_VAR name="value" -->" > <!--TMPL_ELSE--> <option value="<!-- TMPL_VAR name="value" -->" selected="selected"> <!-- /TMPL_UNLESS --> <!-- TMPL_VAR NAME="value" -->-<!-- TMPL_VAR name="branchname" --></option>
317 <label for="budget_permission">Restrict access to: </label>
318 <select name="budget_permission" id="budget_permission">
319 <!-- TMPL_IF NAME="budget_perm_0" --><option value="0" selected="selected">None</option><!-- TMPL_ELSE --><option value="0">None</option><!-- /TMPL_IF -->
320 <!-- TMPL_IF NAME="budget_perm_1" --><option value="1" selected="selected">Owner</option><!-- TMPL_ELSE --><option value="1">Owner</option><!-- /TMPL_IF -->
321 <!-- TMPL_IF NAME="budget_perm_2" --><option value="2" selected="selected">Library</option><!-- TMPL_ELSE --><option value="2">Library</option><!-- /TMPL_IF -->
326 <label for="budget_notes">Notes: </label>
327 <textarea name="budget_notes" id="budget_notes" cols="80" rows="6"><!-- TMPL_VAR NAME="budget_notes" --></textarea>
331 <label style="white-space: nowrap;" for="authorised_value_category1">Planning Category1: </label>
332 <select name="sort1_authcat" id="authorised_value_category1">
333 <option value=""></option>
334 <!-- TMPL_LOOP name="authorised_value_categories1" -->
335 <!-- TMPL_IF name="selected" -->
336 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
337 <!-- TMPL_VAR name="category" -->
340 <option value="<!-- TMPL_VAR name="category" -->">
341 <!-- TMPL_VAR name="category" -->
348 <label style="white-space: nowrap;" for="authorised_value_category2">Planning Category2: </label>
349 <select name="sort2_authcat" id="authorised_value_category2">
350 <option value=""></option>
351 <!-- TMPL_LOOP name="authorised_value_categories2" -->
352 <!-- TMPL_IF name="selected" -->
353 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
354 <!-- TMPL_VAR name="category" -->
357 <option value="<!-- TMPL_VAR name="category" -->">
358 <!-- TMPL_VAR name="category" -->
366 <!-- TMPL_IF NAME="budget_id" -->
367 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
371 <fieldset class="action">
372 <input type="submit" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
373 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
377 <!-- /TMPL_IF --> <!-- add_form -->
379 <!-- TMPL_IF name="delete_confirm" -->
380 <div class="dialog alert"> <h3>Delete Fund <!-- TMPL_VAR NAME="budget_name" -->?</h3>
383 <th scope="row">Fund Amount:</th>
384 <td><!-- TMPL_VAR NAME="budget_amount" --></td>
388 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
389 <input type="hidden" name="op" value="delete_confirmed" />
390 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
391 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
392 <input type="submit" value="Delete this budget" class="approve" />
395 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
396 <input type="submit" class="deny" value="No, Do Not Delete" />
404 <!-- TMPL_IF NAME="else" --><form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
405 <a href="#" id="filterbutton">Filters</a>
406 <fieldset class="brief" id="fundfilters">
407 <h4>Fund filters</h4>
410 <label for="filter_budgetbranch2">Library: </label>
411 <select name="filter_budgetbranch" id="filter_budgetbranch2" style="width:10em;">
412 <option value=""></option>
413 <!-- TMPL_LOOP name="branchloop" -->
414 <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
420 <label for="show_mine">Show my<br /> funds only</label>
421 <!-- TMPL_IF NAME="show_mine" -->
422 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
424 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
429 <input type="hidden" name="show" value="1" />
430 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
431 <input type="submit" class="submit" name="filter" value="Go" />
433 </form><!-- /TMPL_IF -->
434 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
437 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->