Koha/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt
2011-04-10 20:38:30 +12:00

306 lines
10 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions Statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions Statistics[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> [% IF ( do_it ) %]&rsaquo; <a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Acquisitions Statistics</a> &rsaquo; Results[% ELSE %] &rsaquo; Acquisitions Statistics [% END %]</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% IF ( do_it ) %]
[% FOREACH mainloo IN mainloop %]
<h1>Acquisitions statistics </h1>
[% IF ( mainloo.loopfilter ) %]
<p><b>Filtered on:</b></p>
[% FOREACH loopfilte IN mainloo.loopfilter %]
<p>[% loopfilte.crit %]: [% loopfilte.filter %]</p>
[% END %]
[% END %]
<table>
<tr >
<th>[% mainloo.line %] / [% mainloo.column %]</th>
[% FOREACH loopco IN mainloo.loopcol %]
<th>[% loopco.coltitle %]</th>
[% END %]
<th>TOTAL</th>
</tr>
[% FOREACH loopro IN mainloo.looprow %]
<tr>
[% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
[% loopro.rowtitle %]</td>
[% FOREACH loopcel IN loopro.loopcell %]
[% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
[% IF ( loopcel.value ) %][% loopcel.value %]
[% ELSE %] &nbsp;
[% END %]
</td>
[% END %]
[% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
[% loopro.totalrow %]
</td>
</tr>
[% END %]
<tr >
<th>TOTAL</th>
[% FOREACH loopfoote IN mainloo.loopfooter %]
<th>
[% loopfoote.totalcol %]
</th>
[% END %]
<th>[% mainloo.total %]</th>
</tr>
</table>
[% END %]
[% ELSE %]
<form method="post" action="/cgi-bin/koha/reports/acquisitions_stats.pl">
<fieldset class="rows">
<legend>Acquisitions statistics</legend>
<table>
<thead>
<tr>
<th>Title</th>
<th>Row</th>
<th>Column</th>
<th>Filter</th>
</tr>
</thead>
<tbody>
<tr class="hilighted">
<td>Placed On</td>
<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
<td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
<td> From <input type="text" size="10" id="from" name="Filter" value="" />
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
<script type="text/javascript">
//<![CDATA[
function validate1(date) {
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var weekDay = date.getDay();
var dayMonth = month + '-' + day;
var dateString = year + '-' + month + '-' + day;
var dateTo = document.getElementById('to').value.split("-");
var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
if (date > limitDate) {
return true;
} else {
return false;
}
}
Calendar.setup(
{
inputField : "from",
ifFormat : "[% DHTMLcalendar_dateformat %]",
button : "openCalendarFrom",
disableFunc : validate1,
dateStatusFunc : validate1
}
);
//]]>
</script>
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
To <input size="10" id="to" name="Filter" type="text" value="" />
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
<script type="text/javascript">
//<![CDATA[
function validate2(date) {
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var weekDay = date.getDay();
var dayMonth = month + '-' + day;
var dateString = year + '-' + month + '-' + day;
var dateFrom = document.getElementById('from').value.split("-");
var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
if (limitDate > date) {
return true;
} else {
return false;
}
}
Calendar.setup(
{
inputField : "to",
ifFormat : "[% DHTMLcalendar_dateformat %]",
button : "openCalendarTo",
disableFunc : validate2,
dateStatusFunc : validate2
}
);
//]]>
</script>
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
</td>
</tr>
<tr class="hilighted">
<td>&nbsp;</td>
<td colspan="2">group by <select name="PlacedOnDisplay">
<option value="">None</option>
<option value ="1">Day of week</option>
<option value ="2">Month</option>
<option value ="3">Year</option>
</select>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Received On</td>
<td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
<td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
<td> From <input type="text" size="10" id="fromRO" name="Filter" value="" />
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" />
<script type="text/javascript">
//<![CDATA[
function validate1(date) {
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var weekDay = date.getDay();
var dayMonth = month + '-' + day;
var dateString = year + '-' + month + '-' + day;
var dateTo = document.getElementById('toRO').value.split("-");
var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
if (date > limitDate) {
return true;
} else {
return false;
}
}
Calendar.setup(
{
inputField : "fromRO",
ifFormat : "[% DHTMLcalendar_dateformat %]",
button : "openCalendarFromRO",
disableFunc : validate1,
dateStatusFunc : validate1
}
);
//]]>
</script>
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
To <input type="text" size="10" id="toRO" name="Filter" value="" />
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" />
<script type="text/javascript">
//<![CDATA[
function validate2(date) {
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var weekDay = date.getDay();
var dayMonth = month + '-' + day;
var dateString = year + '-' + month + '-' + day;
var dateFrom = document.getElementById('fromRO').value.split("-");
var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
if (limitDate > date) {
return true;
} else {
return false;
}
}
Calendar.setup(
{
inputField : "toRO",
ifFormat : "[% DHTMLcalendar_dateformat %]",
button : "openCalendarToRO",
disableFunc : validate2,
dateStatusFunc : validate2
}
);
//]]>
</script>
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">group by <select name="ReceivedOnDisplay">
<option value="">None</option>
<option value ="1">Day of week</option>
<option value ="2">Month</option>
<option value ="3">Year</option>
</select>
</td>
<td>&nbsp;</td>
</tr>
<tr class="hilighted">
<td>Vendor</td>
<td><input type="radio" checked="checked" name="Line" value="aqbooksellers.name" /></td>
<td><input type="radio" name="Column" value="aqbooksellers.name" /></td>
<td>[% CGIBookSeller %]</td>
</tr>
<tr>
<td>Item Type</td>
<td><input type="radio" name="Line" value="biblioitems.itemtype" /></td>
<td><input type="radio" name="Column" value="biblioitems.itemtype" /></td>
<td>[% CGIItemType %]</td>
</tr>
<tr>
<td>Budget</td>
<td><input type="radio" name="Line" value="aqbudgets.budget_code" /></td>
<td><input type="radio" name="Column" value="aqbudgets.budget_code" /></td>
<td>[% CGIBudget %]</td>
</tr>
[% IF ( hassort1 ) %]
<tr class="hilighted">
<td>Sort1</td>
<td><input type="radio" name="Line" value="aqorders.sort1" /></td>
<td><input type="radio" name="Column" value="aqorders.sort1" /></td>
<td>[% CGISort1 %] </td>
</tr>
[% END %]
[% IF ( hassort2 ) %]
[% IF ( HglghtSort2 ) %]<tr class="hilighted"> [% ELSE %]<tr>[% END %]
<td>Sort2</td>
<td><input type="radio" name="Line" value="aqorders.sort2" /></td>
<td><input type="radio" name="Column" value="aqorders.sort2" /></td>
<td>[% CGISort2 %] </td>
</tr>
[% END %]
</tbody>
</table><br />
</fieldset>
<fieldset class="rows"> <legend> Cell value </legend>
<ol><li><label for="cellvalue1">Count items</label><input type="radio" name="Cellvalue" id="cellvalue1" value="1" checked="checked" /> </li>
<li><label for="cellvalue2">Amount</label><input type="radio" name="Cellvalue" id="cellvalue2" value="2" /> </li></ol></fieldset>
<fieldset class="rows">
<legend>Output</legend>
<ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
<li><label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> <label class="inline" for="MIME">Into an application
</label>[% CGIextChoice %]
[% CGIsepChoice %]</li></ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<input type="hidden" name="report_name" value="[% report_name %]" />
<input type="hidden" name="do_it" value="1" />
</fieldset>
</form>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'reports-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]