5 [% INCLUDE 'doc-head-open.inc' %]
6 [% PROCESS 'budget_planning.inc' %]
7 <title>Koha › Administration › Budgets › Funds › Planning for [% budget_period_description | html %] [% PROCESS planning plan=authcat %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style>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; } .plan_entry { text-align: right; width:90%; }</style>
12 <body id="admin_aqplan" class="admin">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'budgets-admin-search.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
25 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
28 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id | uri %]">Funds</a>
31 <a href="#" aria-current="page">Planning</a>
36 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
41 [% INCLUDE 'budgets-admin-toolbar.inc' %]
43 <form method="post" id="Aform" name="Aform" action="/cgi-bin/koha/admin/aqplan.pl">
44 <h3>Planning for [% budget_period_description | html %] [% PROCESS planning plan=authcat %]</h3>
45 <input type="hidden" name="authcat" value="[% authcat | html %]" />
48 [% IF ( budget_lines ) %]
50 [% INCLUDE 'budgets-active-currency.inc' %]
51 [% IF ( show_actual ) %]
52 <p><strong>Each cell contain both actual and estimated values.</strong></p>
54 <p><strong>Cells contain estimated values only.</strong></p>
58 <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>
59 [% FOREACH authvals_ro IN authvals_row %]
60 <span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span>
69 [% FOREACH authvals_ro IN authvals_row %]
70 [% IF ( authvals_ro.display ) %]
71 <th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]">
73 <th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]">
76 [% authvals_ro.code | html %]</th>
79 <th class="remaining">Fund remaining</th>
80 <th class="noExport">Actions</th>
85 [% FOREACH budget_line IN budget_lines %]
86 <tr id="[% budget_line.budget_id | html %]">
87 [% IF ( budget_line.budget_lock ) %]
88 <td class="locked" title="Fund locked">
92 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=[% budget_line.budget_id | uri %]&budget_period_id=[% budget_period_id | uri %]">[% budget_line.budget_name | html %]</a></td>
93 <td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price %] </span>
96 <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
97 <div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td>
99 [% FOREACH line IN budget_line.lines %]
100 [% IF ( line.display ) %]
101 <td class="[% line.colnum | html %]">
103 <td style="display:none;" class="[% line.colnum | html %]">
105 <table class="invis">
108 <td >[% line.actual_amount | html %]</td>
112 [% IF ( line.budget_lock ) %]
113 [% line.estimated_amount | html %]
114 <input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" />
116 <input type="text" size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry plan_entry_[% line.budget_id | html %]" />
125 <table class="invis">
128 [% IF ( budget_line.act_negative ) %]
129 <td style="color: red;">
130 [% ELSIF ( budget_line.act_positive ) %]
131 <td style="color: green;">
135 [% budget_line.budget_act_remain | html %]
139 [% IF ( budget_line.est_negative ) %]
140 <td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]">
141 [% ELSIF ( budget_line.est_positive ) %]
142 <td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]">
144 <td id="budget_est_[% budget_line.budget_id | html %]">
146 [% budget_line.budget_est_remain | $Price %]
153 [% UNLESS ( budget_line.budget_lock ) %]
154 <input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/>
155 <input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear">
157 <div style="color:red;">not owned</div>
165 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
166 [% IF ( budget_period_locked ) %]
167 <!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> -->
169 <input type="hidden" name="op" value="save" />
170 <fieldset class="action"><input type="submit" value="Save"/></fieldset>
175 [% FOREACH authvals_ro IN authvals_row %]
177 [% UNLESS ( authvals_ro.display ) %]
178 <input type="hidden" value="[% authvals_ro.code | html %]" name="hide_cols"/>
187 [% ELSIF not budget_period_id %]
188 <div class="dialog alert">That budget does not exist! Please select a budget to continue.</div>
190 <div class="dialog message">No funds to display for this search criteria</div>
196 </div> <!-- /.col-sm-10.col-sm-push-2 -->
198 <div class="col-sm-2 col-sm-pull-10">
201 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
202 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
203 <fieldset class="brief">
205 [% BLOCK planning_types %]
207 [% CASE 'MONTHS' %]<span>by months</span>
208 [% CASE 'ITEMTYPES' %]<span>by item types</span>
209 [% CASE 'BRANCHES' %]<span>by libraries</span>
210 [% CASE %]<span>by [% type | html %]</span>
215 <label for="authcat"> Select planning type:</label>
216 <select name="authcat" id="authcat">
217 [% FOREACH value IN authcat_dropbox.values %]
218 [% IF ( value == authcat_dropbox.default ) %]
219 <option value="[% value | html %]" selected="selected">[% PROCESS planning_types type=value %]</option>
221 <option value="[% value | html %]">[% PROCESS planning_types type=value %]</option>
227 [% IF ( show_mine ) %]
228 <input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
230 <input type="checkbox" id="show_mine" name="show_mine" value="1" />
232 <label for="show_mine">Show my funds only</label>
236 [% IF ( show_active ) %]
237 <input type="checkbox" id="show_active" name="show_active" value="1" checked="checked" />
239 <input type="checkbox" id="show_active" name="show_active" value="1" />
241 <label for="show_active">Show active funds only</label>
246 [% IF ( show_actual ) %]
247 <input type="checkbox" id="show_actual" name="show_actual" value="1" checked="checked" />
249 <input type="checkbox" id="show_actual" name="show_actual" value="1" />
251 <label for="show_actual">Show actual/estimated values</label>
254 <fieldset class="action">
255 <input type="submit" name="option_submit" value="Submit" />
256 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
260 [% IF ( budget_lines ) %]
261 <form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
262 <fieldset class="brief">
265 <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" /></li>
266 <li><label class="inline" for="MIME">Into an application</label>
267 <select name="MIME" id="MIME">
268 [% FOREACH value IN CGIextChoice %]
269 <option value="[% value | html %]">[% value | html %]</option>
272 <select name="sep" id="sep">
273 [% FOREACH value IN CGIsepChoice %]
274 <option value="[% value | html %]">[% value | html %]</option>
279 <fieldset class="action"> <input type="submit" value="Submit"/>
280 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
281 <input type="hidden" name="report_name" value="[% report_name | html %]" />
282 <input type="hidden" name="output" value="file" /></fieldset>
283 <input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
284 <input type="hidden" name="authcat" value="[% authcat | html %]" />
289 [% INCLUDE 'acquisitions-menu.inc' %]
291 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
292 </div> <!-- /.row -->
294 [% MACRO jsinclude BLOCK %]
295 [% Asset.js("js/acq.js") | $raw %]
297 jQuery.validator.addClassRules({ plan_entry: { pnumber: true } }); // require that input be a number in fields with the class 'plan_entry'
298 jQuery.validator.addMethod("pnumber", $.validator.methods.number, _("Please enter a valid number.") );
299 var zero_formatted = "[% 0 | $Price on_editing => 1 %]";
300 $(document).ready(function() {
301 $("#selections input").on("change",function(e){
302 var num = $(this).attr("id");
303 if(num == 'showall'){
306 } else if(num == 'hideall'){
310 if($(this).prop("checked")){
317 $(".plan_entry").on("change",function(){
318 calcTotalRow( this );
320 $("#Aform").validate();
321 $(".auto_fill_row").on("click",function(){
322 var budget_id = $(this).data("budget-id");
323 autoFillRow( budget_id );
325 $(".clear_fields").on("click",function(){
326 var budget_id = $(this).data("budget-id");
327 var edit_row = $("#"+budget_id);
328 $(edit_row).find("input").each(function(){
329 var type = $(this).attr("type");
330 if (type != "button" && type != "submit" ) {
331 $(this).val(zero_formatted);
332 $(this).prop('disabled', false);
335 $("#budget_est_"+budget_id).text($("#budget_tot_"+budget_id).prev().text());
336 $("#budget_est_"+budget_id).css("color","green");
341 [% INCLUDE 'intranet-bottom.inc' %]