2616faf132
top level: "Root Budget" becomes "Budget" second level: "Budget" becomes "Fund" third level and below: "Sub-Budget" is also a "Fund", but for things like the "create sub-budget" link, they'll be changed to "create child fund". Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
305 lines
12 KiB
Cheetah
305 lines
12 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>
|
|
Budget planning
|
|
</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
|
|
<link href="<!-- TMPL_VAR NAME="yuipath" -->/reset/reset.css" rel="stylesheet" type="text/css" />
|
|
<link href="<!-- TMPL_VAR NAME="yuipath" -->/fonts/fonts.css" rel="stylesheet" type="text/css" />
|
|
<link href="<!-- TMPL_VAR NAME="yuipath" -->/menu/assets/menu.css" rel="stylesheet" type="text/css" />
|
|
<link href="<!-- TMPL_VAR NAME="yuipath" -->/container/assets/skins/sam/container.css" rel="stylesheet" type="text/css" />
|
|
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/yahoo/yahoo.js" type="text/javascript"></script>
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/event/event.js" type="text/javascript"></script>
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/dom/dom.js" type="text/javascript"></script>
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/menu/menu.js" type="text/javascript"></script>
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/container/menu.js" type="text/javascript"></script>
|
|
<script src="<!-- TMPL_VAR NAME="yuipath" -->/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
|
|
<script type="text/javascript">
|
|
// ---------------------------------------------------------------------
|
|
// Javascript
|
|
// ---------------------------------------------------------------------
|
|
function Check(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
var arr = document.getElementsByName('est_total')
|
|
|
|
for ( var i=0, len=arr.length; i<len; ++i ){
|
|
var tot = arr[i].innerHTML;
|
|
|
|
if (tot == 'NaN') {
|
|
_alertString += "\n- " + _("One or more cell values is non-numeric");
|
|
}
|
|
}
|
|
|
|
if (_alertString.length==0) {
|
|
|
|
var op = document.createElement('input');
|
|
op.setAttribute("type","hidden");
|
|
op.setAttribute("name","op");
|
|
op.setAttribute("value","save"); //ohh the pain...
|
|
|
|
document.Aform.appendChild(op);
|
|
document.Aform.submit()
|
|
|
|
} else {
|
|
alertString2 = _("Form not submitted because of the following problem(s)");
|
|
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
|
|
|
|
YAHOO.util.Event.onAvailable("popmenu", function () {
|
|
|
|
var itemData = new Array();
|
|
table = document.getElementById('plan')
|
|
tableTmp = table.cloneNode(true);
|
|
tableTmp.id = 'planTmp';
|
|
|
|
<!-- TMPL_LOOP NAME="authvals_row" -->
|
|
itemData.push( { text: "<!-- TMPL_VAR NAME="val" -->", onclick: { fn: addColumn, obj: ["<!-- TMPL_VAR NAME="colnum" -->", "<!-- TMPL_VAR NAME="code" -->"] } } );
|
|
|
|
<!-- /TMPL_LOOP -->
|
|
oMenu = new YAHOO.widget.Menu("basicmenu",
|
|
{ position: "dynamic", itemdata: itemData , clicktohide : "true" , context:["popmenu","tl","tr"] }
|
|
);
|
|
|
|
oMenu.render("popmenu");
|
|
YAHOO.util.Event.addListener("add_popmenu_item", "click", oMenu.show, null, oMenu);
|
|
|
|
// oMenu.removeItem(2); // TODO.....
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<title>
|
|
Budget & Fund Planning
|
|
</title>
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
|
|
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
|
|
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
|
|
<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Funds</a> ›
|
|
<a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Planning</a> ›
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
|
|
<!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" -->
|
|
|
|
<br />
|
|
|
|
<form method="post" id='Aform' name="Aform" action="/cgi-bin/koha/admin/aqplan.pl">
|
|
|
|
<fieldset style=" border:2px solid #EEEEEE; " >
|
|
<legend>Planning for <!-- TMPL_VAR NAME="budget_period_description" --> by <!-- TMPL_VAR NAME="authcat" --></legend>
|
|
<table class="invis" >
|
|
<tr><td>
|
|
<!-- TMPL_IF NAME="show_mine" -->
|
|
<input type="checkbox" id="show_mine" name="show_mine" value="1" checked="checked" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="checkbox" id="show_mine" name="show_mine" value="1" />
|
|
<!-- /TMPL_IF -->
|
|
<label for="show_mine">Show my funds only</label>
|
|
</td>
|
|
<td>
|
|
<label for="authcat_dropbox" > Select planning type:</label>
|
|
<!-- TMPL_VAR NAME="authcat_dropbox" -->
|
|
<input type="submit" name="option_submit" value="Select" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr><td>
|
|
<!-- TMPL_IF NAME="show_active" -->
|
|
<input type="checkbox" id="show_active" name="show_active" value="1" checked="checked" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="checkbox" id="show_active" name="show_active" value="1" />
|
|
<!-- /TMPL_IF -->
|
|
<label for="show_active">Show active funds only</label>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<!-- TMPL_UNLESS name="budget_period_locked" -->
|
|
<tr><td>
|
|
<!-- TMPL_IF NAME="show_actual" -->
|
|
<input type="checkbox" id="show_actual" name="show_actual" value="1" checked="checked" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="checkbox" id="show_actual" name="show_actual" value="1" />
|
|
<!-- /TMPL_IF -->
|
|
<label for="show_actual">Show actual/estimated values:</label>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
<!-- /TMPL_UNLESS -->
|
|
</table>
|
|
</fieldset>
|
|
|
|
<br />
|
|
|
|
<!-- Budget Lines -->
|
|
|
|
<!-- TMPL_IF NAME="budget_lines" -->
|
|
|
|
<!-- TMPL_IF name="cur" --><p><b>Currency = <!-- TMPL_VAR name="cur" --></b></p><!-- TMPL_ELSE --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div><!-- /TMPL_IF -->
|
|
|
|
<table id="plan" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>Fund name</th>
|
|
<th>Fund total</th>
|
|
|
|
<!-- TMPL_LOOP NAME="authvals_row" -->
|
|
<!-- TMPL_IF NAME="display" -->
|
|
<th id="<!-- TMPL_VAR NAME="code" -->" style="text-align: center;"
|
|
class="<!-- TMPL_VAR NAME='colnum' -->" >
|
|
<!-- TMPL_ELSE -->
|
|
<th id="<!-- TMPL_VAR NAME="code" -->" style="text-align: center;
|
|
display:none;"
|
|
class="<!-- TMPL_VAR NAME='colnum' -->" >
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_VAR NAME="code" --> <span class="buttonPlus" onclick="delColumn('<!-- TMPL_VAR NAME="colnum" -->', '<!-- TMPL_VAR NAME="code" -->')" > - </span></th>
|
|
|
|
<!-- /TMPL_LOOP -->
|
|
|
|
<th>Fund remaining</th>
|
|
|
|
<th id='popmenu' style=" text-align: center;" >
|
|
<span id="add_popmenu_item" class="buttonPlus" > + </span></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<!-- TMPL_LOOP NAME="budget_lines" -->
|
|
<!-- TMPL_IF Name="budget_lock" -->
|
|
<tr class="highlight" >
|
|
<!--TMPL_ELSE -->
|
|
<tr >
|
|
<!--/TMPL_IF -->
|
|
|
|
<td align='left'><!-- TMPL_VAR NAME="budget_name_indent"--></td>
|
|
<td align='right'><span id='budget_tot_formatted" -->'><!-- TMPL_VAR NAME="budget_amount_formatted"--> </span>
|
|
|
|
<!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
|
|
<div style="display:none;" id='budget_tot_<!-- TMPL_VAR NAME="budget_id" -->'><!-- TMPL_VAR NAME="budget_amount"--></div></td>
|
|
|
|
<!-- TMPL_LOOP NAME="lines" -->
|
|
<td
|
|
<!-- TMPL_UNLESS Name="display" --> style="display:none;"<!-- /TMPL_UNLESS -->
|
|
class="<!-- TMPL_VAR NAME="colnum"-->" >
|
|
<table class="invis" width="100%">
|
|
<tr>
|
|
<!-- TMPL_IF Name="show_actual" -->
|
|
<td width="50%" align="right" ><!-- TMPL_VAR NAME="actual_amount" --></td>
|
|
<!--/TMPL_IF -->
|
|
<td align="right">
|
|
|
|
<!--TMPL_IF Name="budget_lock" -->
|
|
<!-- TMPL_VAR NAME="estimated_amount" -->
|
|
<input type="hidden" style="text-align: right;" name='<!-- TMPL_VAR NAME="cell_name"-->' value="<!-- TMPL_VAR NAME="estimated_amount" -->" />
|
|
<!--TMPL_ELSE -->
|
|
<input type="text" style="text-align: right; width:90%; " size='6' name='<!-- TMPL_VAR NAME="cell_name"-->' value="<!-- TMPL_VAR NAME="estimated_amount" -->" id='<!-- TMPL_VAR NAME="budget_id"-->' class='<!-- TMPL_VAR NAME="budget_id"-->' onchange="calcTotalRow(this);" />
|
|
<!--/TMPL_IF -->
|
|
|
|
</td></tr>
|
|
</table>
|
|
</td>
|
|
<!-- /TMPL_LOOP -->
|
|
|
|
<td>
|
|
<table class="invis" width="100%">
|
|
<tr>
|
|
<td width="50%" align="right"
|
|
<!-- TMPL_IF Name="show_actual" -->
|
|
<!-- TMPL_IF NAME="act_negative" --> style="color: red;" <!--/TMPL_IF -->
|
|
<!-- TMPL_IF NAME="act_positive" --> style="color: green;" <!--/TMPL_IF --> >
|
|
<!-- TMPL_VAR NAME="budget_act_remain"-->
|
|
<!-- TMPL_ELSE --> >
|
|
<!-- /TMPL_IF -->
|
|
</td>
|
|
|
|
<td width="50%" align="right"
|
|
<!-- TMPL_IF NAME="est_negative" --> style="color: red;" <!--/TMPL_IF -->
|
|
<!-- TMPL_IF NAME="est_positive" --> style="color: green;" <!--/TMPL_IF -->
|
|
name="est_total" id='budget_est_<!-- TMPL_VAR NAME="budget_id"-->'> <!-- TMPL_VAR NAME="budget_est_remain"-->
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
|
|
<td align="center">
|
|
<!-- TMPL_UNLESS Name="budget_lock" -->
|
|
<input type="button" onclick="autoFillRow('<!-- TMPL_VAR NAME="budget_id"-->')" value="Auto-fill row"/>
|
|
<!-- TMPL_ELSE -->
|
|
<div style="color:red;">not owned</div>
|
|
<!-- /TMPL_UNLESS -->
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
<tbody>
|
|
</table>
|
|
|
|
<!-- TMPL_IF NAME="show_actual" -->
|
|
<span><b>Each cell contain both actual and estimated values.</b></span><br />
|
|
<!-- TMPL_ELSE -->
|
|
<span><b>Cells contain estimated values only.</b></span><br />
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="budget_period_locked" -->
|
|
<!-- <input STYLE="background: gray;" type="submit" value="Save" disabled='disabled'/> -->
|
|
<!-- TMPL_ELSE -->
|
|
<input type="button" onclick="Check(this.form)" value="Save"/>
|
|
<!-- /TMPL_IF -->
|
|
|
|
|
|
<div id='hide_div'>
|
|
<!-- TMPL_LOOP NAME="authvals_row" -->
|
|
|
|
<!-- TMPL_UNLESS Name="display" -->
|
|
<input type="hidden" value="<!-- TMPL_VAR NAME="code" -->" name="hide_cols"/>
|
|
<!-- /TMPL_UNLESS -->
|
|
<!-- /TMPL_LOOP -->
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
<form method="post" action="/cgi-bin/koha/admin/aqplan.pl">
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li><label for="outputfile">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" />
|
|
<label class="inline" for="MIME">Into an application
|
|
</label><!-- TMPL_VAR NAME="CGIextChoice" -->
|
|
<!-- TMPL_VAR NAME="CGIsepChoice" -->
|
|
<input type="submit" value="Output"/>
|
|
<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
|
|
<input type="hidden" name="output" value="file" />
|
|
</li></ol>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<!-- TMPL_ELSE -->
|
|
No funds to display for this search criteria
|
|
<!-- /TMPL_IF -->
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|