5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › Budgets › Funds › Planning for [% budget_period_description | html %] by [% authcat | html %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <style type="text/css">td.locked { background-image: url('[% interface | html %]/[% theme | html %]/img/locked.png'); padding-left : 20px; background-repeat: no-repeat; background-position: 5px 5px; } a.control { font-size:85%;text-decoration:none; }</style>
11 <body id="admin_aqplan" class="admin">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'budgets-admin-search.inc' %]
15 <div id="breadcrumbs">
16 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
17 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
18 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
19 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id | html %]">Funds</a> ›
20 <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id | html %]">Planning</a> ›
23 <div id="doc3" class="yui-t2">
28 [% INCLUDE 'budgets-admin-toolbar.inc' %]
30 <form method="post" id="Aform" name="Aform" action="/cgi-bin/koha/admin/aqplan.pl">
31 <h3>Planning for [% budget_period_description | html %] by [% authcat | html %]</h3>
32 <input type="hidden" name="authcat" value="[% authcat | html %]" />
35 [% IF ( budget_lines ) %]
37 [% INCLUDE 'budgets-active-currency.inc' %]
38 [% IF ( show_actual ) %]
39 <p><b>Each cell contain both actual and estimated values.</b></p>
41 <p><b>Cells contain estimated values only.</b></p>
45 <strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span>
46 [% FOREACH authvals_ro IN authvals_row %]
47 <span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span>
56 [% FOREACH authvals_ro IN authvals_row %]
57 [% IF ( authvals_ro.display ) %]
58 <th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]">
60 <th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]">
63 [% authvals_ro.code | html %]</th>
66 <th class="remaining">Fund remaining</th><th> </th>
71 [% FOREACH budget_line IN budget_lines %]
73 [% IF ( budget_line.budget_lock ) %]
74 <td class="locked" title="Fund locked">
78 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=[% budget_line.budget_id | html %]&budget_period_id=[% budget_period_id | html %]">[% budget_line.budget_name | html %]</a></td>
79 <td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price | html %] </span>
82 <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
83 <div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td>
85 [% FOREACH line IN budget_line.lines %]
86 [% IF ( line.display ) %]
87 <td class="[% line.colnum | html %]">
89 <td style="display:none;" class="[% line.colnum | html %]">
94 <td >[% line.actual_amount | html %]</td>
98 [% IF ( line.budget_lock ) %]
99 [% line.estimated_amount | html %]
100 <input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" />
102 <input type="text" style="text-align: right; width:90%; " size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry_[% line.budget_id | html %]" onchange="calcTotalRow(this);" />
111 <table class="invis">
114 [% IF ( budget_line.act_negative ) %]
115 <td style="color: red;">
116 [% ELSIF ( budget_line.act_positive ) %]
117 <td style="color: green;">
121 [% budget_line.budget_act_remain | html %]
125 [% IF ( budget_line.est_negative ) %]
126 <td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]">
127 [% ELSIF ( budget_line.est_positive ) %]
128 <td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]">
130 <td id="budget_est_[% budget_line.budget_id | html %]">
132 [% budget_line.budget_est_remain | $Price | html %]
139 [% UNLESS ( budget_line.budget_lock ) %]
140 <input type="button" onclick="autoFillRow('[% budget_line.budget_id | html %]')" value="Auto-fill row"/>
142 <div style="color:red;">not owned</div>
150 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
151 [% IF ( budget_period_locked ) %]
152 <!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> -->
154 <fieldset class="action"><input type="button" onclick="Check(this.form)" value="Save"/></fieldset>
159 [% FOREACH authvals_ro IN authvals_row %]
161 [% UNLESS ( authvals_ro.display ) %]
162 <input type="hidden" value="[% authvals_ro.code | html %]" name="hide_cols"/>
171 [% ELSIF not budget_period_id %]
172 <div class="dialog alert">That budget does not exist! Please select a budget to continue.</div>
174 <div class="dialog message">No funds to display for this search criteria</div>
182 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
183 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
184 <fieldset class="brief">
186 [% BLOCK planning_types %]
188 [% CASE 'MONTHS' %]<span>by months</span>
189 [% CASE 'ITEMTYPES' %]<span>by item types</span>
190 [% CASE 'BRANCHES' %]<span>by libraries</span>
191 [% CASE %]<span>by [% type | html %]</span>
196 <label for="authcat"> Select planning type:</label>
197 <select name="authcat" id="authcat" size="1">
198 [% FOREACH value IN authcat_dropbox.values %]
199 [% IF ( value == authcat_dropbox.default ) %]
200 <option value="[% value | html %]" selected="selected">[% PROCESS planning_types type=value %]</option>
202 <option value="[% value | html %]">[% PROCESS planning_types type=value %]</option>
208 [% IF ( show_mine ) %]
209 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
211 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
213 <label for="show_mine">Show my funds only</label>
217 [% IF ( show_active ) %]
218 <input type="checkbox" id="show_active" name="show_active" value="1" checked="checked" />
220 <input type="checkbox" id="show_active" name="show_active" value="1" />
222 <label for="show_active">Show active funds only</label>
227 [% IF ( show_actual ) %]
228 <input type="checkbox" id="show_actual" name="show_actual" value="1" checked="checked" />
230 <input type="checkbox" id="show_actual" name="show_actual" value="1" />
232 <label for="show_actual">Show actual/estimated values</label>
235 <fieldset class="action">
236 <input type="submit" name="option_submit" value="Submit" />
237 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
241 [% IF ( budget_lines ) %]
242 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
243 <fieldset class="brief">
246 <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" /></li>
247 <li><label class="inline" for="MIME">Into an application</label>
248 <select name="MIME" id="MIME" size="1">
249 [% FOREACH value IN CGIextChoice %]
250 <option value="[% value | html %]">[% value | html %]</option>
253 <select name="sep" id="sep" size="1">
254 [% FOREACH value IN CGIsepChoice %]
255 <option value="[% value | html %]">[% value | html %]</option>
260 <fieldset class="action"> <input type="submit" value="Submit"/>
261 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
262 <input type="hidden" name="report_name" value="[% report_name | html %]" />
263 <input type="hidden" name="output" value="file" /></fieldset>
264 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
265 <input type="hidden" name="authcat" value="[% authcat | html %]" />
270 [% INCLUDE 'acquisitions-menu.inc' %]
273 [% MACRO jsinclude BLOCK %]
274 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
275 [% Asset.js("js/acq.js") | $raw %]
276 <script type="text/javascript">
282 var arr = document.getElementsByName('est_total')
284 for ( var i=0, len=arr.length; i<len; ++i ){
285 var tot = arr[i].innerHTML;
288 _alertString += "\n- " + _("One or more cell values is non-numeric");
292 if (_alertString.length==0) {
294 var op = document.createElement('input');
295 op.setAttribute("type","hidden");
296 op.setAttribute("name","op");
297 op.setAttribute("value","save"); //ohh the pain...
299 document.Aform.appendChild(op);
300 document.Aform.submit()
303 alertString2 = _("Form not submitted because of the following problem(s)");
304 alertString2 += "\n------------------------------------------------------------------------------------\n";
305 alertString2 += _alertString;
309 $(document).ready(function() {
310 $("#selections input").on("change",function(e){
311 var num = $(this).attr("id");
312 if(num == 'showall'){
315 } else if(num == 'hideall'){
319 if($(this).prop("checked")){
330 [% INCLUDE 'intranet-bottom.inc' %]