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">
11 function ownerRemove(f) {
12 document.getElementById('budget_owner_name').innerHTML = '';
22 if (!(isNotNull(f.budget_code,1))) {
23 _alertString += _("- Budget code missing\n");
26 if (!(isNotNull(f.budget_name,1))) {
27 _alertString += _("- Budget name missing\n");
30 if( ! (isNum(f.budget_amount,0)) && ! (isNum(f.budget_amount_sublevel,0) ) ) {
31 _alertString += _("- Budget base-level and sub-level amount missing or invalid\n");
35 if (typeof(f.budget_id ) != "undefined") {
36 budgetId = f.budget_id.value
41 // hack to test if selected parent_id in scrolling-list...
42 // if value == 'undef' its got a selected_parent :/
43 var chkAdd = f.budget_parent_id.value ;
44 if ( typeof(chkAdd ) != "undefined") {
45 newBudgetParent = f.budget_parent_id.value
47 newBudgetParent = f.budget_parent_id.item(0).value
50 if (budgetId > 0) { ; //its a mod ...
51 // if parent eq curent-budget, fail...
52 if ( newBudgetParent == budgetId ) {
53 _alertString += _("- Budget parent is current budget\n");
56 else if (newBudgetParent) {
57 var result = checkBudgetParent( budgetId , newBudgetParent );
59 _alertString += result;
65 var budgetTotal = Math.abs(f.budget_amount.value) + Math.abs(f.budget_amount_sublevel.value);
66 var result = budgetExceedsParent (budgetTotal, budgetId, newBudgetParent, f.budget_period_id.value)
68 _alertString += result;
71 if (_alertString.length==0) {
72 document.Aform.submit();
74 alertString2 = _("Form not submitted because of the following problem(s)\n");
75 alertString2 += "------------------------------------------------------------------------------------\n\n";
76 alertString2 += _alertString;
86 <!-- TMPL_INCLUDE NAME="header.inc" -->
87 <!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
89 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
90 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
91 <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" -->
92 <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> › Delete Budget?<!-- /TMPL_IF --></div>
94 <div id="doc3" class="yui-t2">
99 <!-- TMPL_INCLUDE NAME="budgets-admin.inc" -->
100 <!-- TMPL_IF name="else" -->
102 <h1>Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
103 <input type="hidden" name"budget_period_id" value="<!-- TMPL_VAR name= 'budget_period_id' -->" />
104 <form action="/cgi-bin/koha/admin/aqbudgets.pl" method="post">
106 <legend>Budget options</legend>
107 <li><label for="budget_period_dropbox">Select Budget Period:</label>
108 <!-- TMPL_VAR name="budget_period_dropbox" -->
109 <input type="hidden" value="<!-- TMPL_VAR name='budget_period_id' -->" />
112 <label for="budget_branchcode_dropbox">Limit to Branch:</label>
113 <select name="budget_branchcode" >
114 <option value=""></option>
115 <!-- TMPL_LOOP name="branchloop" -->
116 <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
120 <input type="hidden" value="<!-- TMPL_VAR name='budget_period_id' -->" />
122 <!-- TMPL_IF NAME="show_mine" -->
123 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
125 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
127 <label for="show_mine">Show my budgets only</label>
129 <input type="hidden" name="show" value="1" -->
130 <input type="submit" value="Select" />
136 <th>Budget hierarchy</th>
138 <th>Total<br>allocated</th>
139 <th>Base-level<br>allocated</th>
140 <th>Sub-level<br>allocated (unallocated)</th>
141 <th>Base-level<br>spent</th>
142 <th>Base-level<br>remaining</th>
144 <th>Sub-level<br>spent</th>
151 <th colspan="3">Actions</th>
154 <!-- TMPL_LOOP name="budget" -->
155 <!-- TMPL_IF NAME="toggle" -->
156 <tr class="highlight">
161 <td><!-- TMPL_VAR NAME="budget_code_indent" --></td>
162 <td><!-- TMPL_VAR NAME="budget_name" --></td>
163 <td align='right'><!-- TMPL_VAR NAME="budget_amount_total" --></td>
164 <td align='right'><!-- TMPL_VAR NAME="budget_amount" --> </td>
165 <!-- TMPL_IF NAME="budget_amount_sublevel" -->
166 <td align='center'><!-- TMPL_VAR NAME="budget_amount_sublevel" -->
167 <!-- TMPL_IF NAME="budget_unalloc_sublevel" -->
168 (<span STYLE="color: green;" > <!-- TMPL_VAR NAME="budget_unalloc_sublevel" --></span>)
172 <td align='center'>--</td>
175 <td align='right'><!-- TMPL_VAR NAME="budget_spent" --> </td>
177 <!-- TMPL_IF NAME="remaining_pos" --> STYLE="color: green;" <!-- /TMPL_IF -->
178 <!-- TMPL_IF NAME="remaining_neg" --> STYLE="color: red;" <!-- /TMPL_IF --> >
179 <!-- TMPL_VAR NAME="budget_remaining" --> </td>
182 <td><!-- TMPL_VAR NAME="budget_encumb" --></td>
183 <td><!-- TMPL_VAR NAME="budget_expend" --></td>
185 <td> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a></td>
187 <td><!-- TMPL_VAR NAME="budget_branchcode" --></td>
188 <td><!-- TMPL_VAR NAME="budget_notes" --></td>
189 <!-- TMPL_IF NAME='budget_lock'-->
190 <td> <span STYLE="color: gray;" > Edit Delete </span> </td>
192 <td><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>
193 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=delete_confirm&budget_id=<!-- TMPL_VAR NAME="budget_id" -->">Delete </a></td>
200 <th colspan='2' style='text-align: left;' nowrap>Period allocated <!-- TMPL_VAR NAME='budget_period_total'--> </th>
201 <th nowrap style='text-align: right;' > <!-- TMPL_VAR NAME='period_alloc_total'--></th>
202 <th nowrap style='text-align: right;'> <!-- TMPL_VAR NAME='base_alloc_total'--></th>
203 <th nowrap style='text-align: center;'> <!-- TMPL_VAR NAME='sub_alloc_total'--></th>
204 <th style='text-align: right;' ><!-- TMPL_VAR NAME='base_spent_total'--></th>
205 <th style='text-align: right;' ><!-- TMPL_VAR NAME='base_remaining_total'--></th>
214 <span><b>Currency = <!-- TMPL_VAR NAME="cur" --> <!-- TMPL_VAR NAME="cur_format" --></b></span><br>
215 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
216 <!-- /TMPL_IF --> <!-- else -->
218 <!-- ********************************************************************************************** -->
219 <!-- create add/mod entry form -->
220 <!-- TMPL_IF name="add_form" -->
222 <form action="/cgi-bin/koha/admin/aqbudgets.pl" name="Aform" method="post">
223 <fieldset class="rows">
224 <legend><!-- TMPL_IF NAME="budget_id" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget
225 <!-- TMPL_IF NAME="budget_period_description" -->
226 <!-- TMPL_VAR NAME="budget_name" --> for period <!-- TMPL_VAR NAME="budget_period_description" -->
230 <input type="hidden" name="op" value="add_validate" />
231 <input type="hidden" name="checked" value="0" />
234 <label for="parents">Budget Parent: </label>
235 <!-- TMPL_VAR NAME="budget_parent_dropbox" -->
237 <input type="hidden" name="budget_parent_id" value="<!-- TMPL_VAR NAME="budget_parent_id" -->" />
241 <label style="color: red;" for="budget_code">Budget Code: </label>
242 <input type="text" name="budget_code" id="budget_code" value="<!-- TMPL_VAR NAME="budget_code" -->" size="30" />
246 <label style="color: red;" for="budget_name">Budget Name: </label>
247 <input type="text" name="budget_name" id="budget_name" value="<!-- TMPL_VAR NAME="budget_name" -->" size="60" />
250 <div class='hint'>base-level and sub-level amount fields cannot both be empty</div>
252 <label style='white-space: nowrap;' for="budget_amount">Base-level amount: </label>
253 <input type="text" name="budget_amount" id="budget_amount" value="<!-- TMPL_VAR NAME="budget_amount" -->" size="8" />
257 <label for="budget_amount_sublevel">Sub-level amount: </label>
258 <input type="text" name="budget_amount_sublevel" id="budget_amount_sublevel" value="<!-- TMPL_VAR NAME="budget_amount_sublevel" -->" size="8" />
262 <label for="">Encumbrance: </label>
263 <input type="text" name="budget_encumb" id="budget_encumb" value="<!-- TMPL_VAR NAME="budget_encumb" -->" size="8" />
267 <label for="">Expenditure: </label>
268 <input type="text" name="budget_expend" id="budget_expend" value="<!-- TMPL_VAR NAME="budget_expend" -->" size="8" />
271 <input type="hidden" name="budget_owner_id" id="budget_owner_id" value='<!-- TMPL_VAR NAME="budget_owner_id" -->' />
273 <label for="parents">Owner: </label>
274 <span id="budget_owner_name">
275 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="budget_owner_id" -->"><!-- TMPL_VAR NAME="budget_owner_name" --></a>
278 <!-- FIXME: hardcoded button positions :/ -->
279 <input style="position:absolute; left:600px;" type="button" id="patron_search" value="Edit owner" onclick="ownerPopup(); return false;" />
280 <input style="position:absolute; left:680px;" type="button" id="patron_search" value="Remove owner" onclick="ownerRemove(this.form); return false;" />
287 <label for="branch">Library: </label>
288 <select name="budget_branchcode">
289 <option value=""></option>
290 <!-- TMPL_LOOP name="branchloop_select" -->
291 <option value="<!-- TMPL_VAR name="value" -->"
292 <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF --> >
293 <!-- TMPL_VAR name="branchname" --></option>
299 <label for="branch">Restrict access to: </label>
300 <!-- TMPL_VAR name="budget_perm_dropbox" -->
304 <label for="">Notes: </label>
305 <textarea name="budget_notes" id="budget_notes" cols="80" rows="6" ><!-- TMPL_VAR NAME='budget_notes' --></textarea>
309 <label style='white-space: nowrap;' for="parents">Planning Category1: </label>
310 <!-- TMPL_VAR NAME="sort1_authcat_dropbox" -->
313 <label style='white-space: nowrap;' for="parents">Planning Category2: </label>
314 <!-- TMPL_VAR NAME="sort2_authcat_dropbox" -->
318 <!-- TMPL_IF NAME="budget_id" -->
319 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME='budget_id' -->" />
323 <fieldset class="action">
324 <input type="button" value="Submit" onclick="Check(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a>
325 <input type="hidden" name="budget_period_id" value="<!-- TMPL_VAR name='budget_period_id' -->" />
329 <!-- /TMPL_IF --> <!-- add_form -->
331 <!-- TMPL_IF name="delete_confirm" -->
332 <div class="dialog alert"> <h3>Delete Budget <!-- TMPL_VAR NAME="budget_name" -->?</h3>
335 <th scope="row">Budget Amount:</td>
336 <td><!-- TMPL_VAR NAME="budget_amount" --></td>
340 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
341 <input type="hidden" name="op" value="delete_confirmed" />
342 <input type="hidden" name="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" />
343 <input type="submit" value="Delete this budget" class="approve" />
346 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
347 <input type="submit" class="deny" value="No, Do Not Delete" />
355 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
358 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->