1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Administration › Budgets<!-- TMPL_IF name="add_form" --> › <!--TMPL_IF NAME="budget_id" -->Modify Budget<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add Budget <!-- /TMPL_IF --><!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/acq.js"></script>
7 <!-- TMPL_IF name="add_form" -->
8 <script type="text/javascript">
13 function ownerRemove(f) {
14 document.getElementById('budget_owner_name').innerHTML = '';
24 if (!(isNotNull(f.budget_code,1))) {
25 _alertString += _("- Budget code cannot be blank\n");
28 if (!(isNotNull(f.budget_name,1))) {
29 _alertString += _("- Budget name cannot be blank\n");
32 if (!(isNotNull(f.budget_amount,1))) {
33 _alertString += _("- Budget amount cannot be blank\n");
37 if (typeof(f.budget_id ) != "undefined") {
38 budgetId = f.budget_id.value
43 // hack to test if selected parent_id in scrolling-list...
44 // if value == 'undef' its got a selected_parent :/
45 if(f.budget_parent_id){
46 var chkAdd = f.budget_parent_id.value ;
47 if ( typeof(chkAdd ) != "undefined") {
48 newBudgetParent = f.budget_parent_id.value
50 newBudgetParent = f.budget_parent_id.item(0).value
53 if (budgetId > 0) { ; //its a mod ...
54 // if parent eq curent-budget, fail...
55 if ( newBudgetParent == budgetId ) {
56 _alertString += _("- Budget parent is current budget\n");
59 else if (newBudgetParent) {
60 var result = checkBudgetParent( budgetId , newBudgetParent );
62 _alertString += result;
69 var budgetTotal = Math.abs(f.budget_amount.value);
70 var result = budgetExceedsParent (budgetTotal, budgetId, newBudgetParent, f.budget_period_id.value)
72 _alertString += result;
75 if (_alertString.length==0) {
76 document.Aform.submit();
78 alertString2 = _("Form not submitted because of the following problem(s)\n");
79 alertString2 += "------------------------------------------------------------------------------------\n\n";
80 alertString2 += _alertString;
87 <link href="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/treetable/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
89 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
90 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/treetable/jquery.treeTable.min.js"></script>
91 <script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.qtip.js"></script>
93 <script type="text/javascript">
96 $(document).ready(function() {
97 var tooltipcontent = $(".tooltipcontent");
98 tooltipcontent.hide();
100 $(".tooltiped td").each(function (){
101 contentelem = $(this).parent().children().filter(".tooltipcontent");
102 if(contentelem.html() != ""){
104 content: contentelem.html(),
118 tooltip: "bottomRight"
124 <!-- TMPL_IF NAME="notree" -->
125 $("#budgeth").tablesorter({
128 headers: { 7: { sorter: false }}
131 $("#budgeth").treeTable();
140 <!-- TMPL_INCLUDE NAME="header.inc" -->
141 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
143 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
144 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root budgets</a> › <!-- TMPL_IF NAME="else" -->Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
145 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Budgets</a> › <!-- TMPL_IF NAME="budget_id" -->Modify budget<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add budget<!-- /TMPL_IF --><!-- /TMPL_IF --> <!-- TMPL_IF name="delete_confirm" -->
146 <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> › Delete budget?<!-- /TMPL_IF --></div>
148 <div id="doc3" class="yui-t2">
153 <!-- TMPL_UNLESS name="delete_confirm" --><!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" --><!-- /TMPL_UNLESS -->
154 <!-- TMPL_IF name="else" -->
156 <h1>Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
161 <th>Budget hierarchy</th>
163 <th>Total<br />allocated</th>
164 <th>Base-level<br />allocated</th>
165 <th>Base-level<br />spent</th>
166 <th>Base-level<br />remaining</th>
167 <th class="tooltipcontent"> </th>
176 <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>
177 <th nowrap="nowrap" class="data"> <!-- TMPL_VAR NAME="period_alloc_total"--></th>
178 <th nowrap="nowrap" class="data"> <!-- TMPL_VAR NAME="base_alloc_total"--></th>
179 <th class="data"><!-- TMPL_VAR NAME="base_spent_total"--></th>
180 <th class="data"><!-- TMPL_VAR NAME="base_remaining_total"--></th>
181 <th class="tooltipcontent"></th>
186 <!-- TMPL_IF NAME="budget" -->
187 <!-- TMPL_LOOP name="budget" -->
188 <!-- TMPL_IF NAME="toggle" -->
189 <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">
191 <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 -->">
194 <td><!-- TMPL_VAR NAME="budget_code_indent" --></td>
195 <td><!-- TMPL_VAR NAME="budget_name" --></td>
196 <td class="data"><!-- TMPL_VAR NAME="budget_amount_total" --></td>
197 <td class="data"><!-- TMPL_VAR NAME="budget_amount" --> </td>
198 <td class="data"><!-- TMPL_VAR NAME="budget_spent" --> </td>
200 <!-- TMPL_IF NAME="remaining_pos" --> style="color: green;" <!-- /TMPL_IF -->
201 <!-- TMPL_IF NAME="remaining_neg" --> style="color: red;" <!-- /TMPL_IF --> >
202 <!-- TMPL_VAR NAME="budget_remaining" --> </td>
204 <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 --><!-- TMPL_IF NAME="budget_branchcode" --><br /><strong>Library: </strong><!-- TMPL_VAR NAME="budget_branchcode" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="budget_notes" --><br /><strong>Notes: </strong><!-- TMPL_VAR NAME="budget_notes" --><!-- /TMPL_IF --></td>
205 <!-- TMPL_IF NAME="budget_lock"-->
206 <td> <span style="color: gray;" > Edit Delete </span> </td>
209 <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>
210 <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>
211 <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>
217 <tr><td colspan="9">No budget found</td></tr>
222 <p><b>Currency = <!-- TMPL_VAR NAME="cur" --> <!-- TMPL_VAR NAME="cur_format" --></b></p>
223 <!-- TMPL_IF NAME="pagination_bar" --><div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div><!-- /TMPL_IF -->
224 <!-- /TMPL_IF --> <!-- else -->
226 <!-- ********************************************************************************************** -->
227 <!-- create add/mod entry form -->
228 <!-- TMPL_IF name="add_form" -->
230 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
231 <fieldset class="rows">
232 <legend><!-- TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget
233 <!-- TMPL_IF NAME="budget_period_description" -->
234 <!-- TMPL_VAR NAME="budget_name" --> for period <!-- TMPL_VAR NAME="budget_period_description" -->
238 <input type="hidden" name="op" value="add_validate" />
239 <input type="hidden" name="checked" value="0" />
241 <!-- TMPL_IF NAME="budget_parent_id" -->
243 <span class="label">Budget Parent: </span>
244 <!-- TMPL_VAR NAME="budget_parent_name" -->
245 <input type="hidden" name="budget_parent_id" value="<!-- TMPL_VAR NAME="budget_parent_id" -->" />
249 <label class="required" for="budget_code">Budget Code: </label>
250 <input type="text" name="budget_code" id="budget_code" value="<!-- TMPL_VAR NAME="budget_code" -->" size="30" />
254 <label class="required" for="budget_name">Budget Name: </label>
255 <input type="text" name="budget_name" id="budget_name" value="<!-- TMPL_VAR NAME="budget_name" -->" size="60" />
259 <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label>
260 <input type="text" name="budget_amount" id="budget_amount" value="<!-- TMPL_VAR NAME="budget_amount" -->" size="8" />
264 <label for="budget_encumb">Encumbrance: </label>
265 <input type="text" name="budget_encumb" id="budget_encumb" value="<!-- TMPL_VAR NAME="budget_encumb" -->" size="8" />
269 <label for="budget_expend">Expenditure: </label>
270 <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" -->" />
274 <span class="label">Owner: </span>
275 <span id="budget_owner_name">
276 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a>
279 <!-- FIXME: hardcoded button positions :/ -->
280 <input style="" type="button" id="edit_owner" value="Edit owner" onclick="ownerPopup(); return false;" />
281 <input style="" type="button" id="remove_owner" value="Remove owner" onclick="ownerRemove(this.form); return false;" />
285 <label for="budget_branchcode">Library: </label>
286 <select name="budget_branchcode" id="budget_branchcode">
287 <option value=""></option>
288 <!-- TMPL_LOOP name="branchloop_select" -->
289 <!-- 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>
295 <label for="budget_permission">Restrict access to: </label>
296 <!-- TMPL_VAR name="budget_perm_dropbox" -->
300 <label for="budget_notes">Notes: </label>
301 <textarea name="budget_notes" id="budget_notes" cols="80" rows="6"><!-- TMPL_VAR NAME="budget_notes" --></textarea>
305 <label style="white-space: nowrap;" for="authorised_value_category1">Planning Category1: </label>
306 <select name="sort1_authcat" id="authorised_value_category1">
307 <option value=""></option>
308 <!-- TMPL_LOOP name="authorised_value_categories1" -->
309 <!-- TMPL_IF name="selected" -->
310 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
311 <!-- TMPL_VAR name="category" -->
314 <option value="<!-- TMPL_VAR name="category" -->">
315 <!-- TMPL_VAR name="category" -->
322 <label style="white-space: nowrap;" for="authorised_value_category2">Planning Category2: </label>
323 <select name="sort2_authcat" id="authorised_value_category2">
324 <option value=""></option>
325 <!-- TMPL_LOOP name="authorised_value_categories2" -->
326 <!-- TMPL_IF name="selected" -->
327 <option value="<!-- TMPL_VAR name="category" -->" selected="selected">
328 <!-- TMPL_VAR name="category" -->
331 <option value="<!-- TMPL_VAR name="category" -->">
332 <!-- TMPL_VAR name="category" -->
340 <!-- TMPL_IF NAME="budget_id" -->
341 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
345 <fieldset class="action">
346 <input type="submit" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
347 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name="budget_period_id" -->" />
351 <!-- /TMPL_IF --> <!-- add_form -->
353 <!-- TMPL_IF name="delete_confirm" -->
354 <div class="dialog alert"> <h3>Delete Budget <!-- TMPL_VAR NAME="budget_name" -->?</h3>
357 <th scope="row">Budget Amount:</th>
358 <td><!-- TMPL_VAR NAME="budget_amount" --></td>
362 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
363 <input type="hidden" name="op" value="delete_confirmed" />
364 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
365 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
366 <input type="submit" value="Delete this budget" class="approve" />
369 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
370 <input type="submit" class="deny" value="No, Do Not Delete" />
378 <!-- TMPL_IF NAME="else" --><form action="/cgi-bin/koha/admin/aqbudgets.pl" method="get">
379 <fieldset class="brief">
380 <h4>Budget filters</h4>
383 <label for="filter_budgetbranch2">Library: </label>
384 <select name="filter_budgetbranch" id="filter_budgetbranch2" style="width:10em;">
385 <option value=""></option>
386 <!-- TMPL_LOOP name="branchloop" -->
387 <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
393 <label for="show_mine">Show my<br /> budgets only</label>
394 <!-- TMPL_IF NAME="show_mine" -->
395 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
397 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
402 <input type="hidden" name="show" value="1" />
403 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR NAME="budget_period_id" -->" />
404 <input type="submit" class="submit" name="filter" value="Go" />
406 </form><!-- /TMPL_IF -->
410 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->