Koha/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tmpl
Chris Nighswonger f6a3f83ca2 kohabug 2224 Third installment: Further corrections for NULL fields
This patch adds code to clean out any NULL fields in rows returned
since NULL fields do not truly meet the filter criteria

It also corrects a bad db field reference.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:10:21 -05:00

300 lines
11 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Reports <!-- TMPL_IF NAME="do_it" -->&rsaquo; Acquisitions Statistics &rsaquo; Results<!-- TMPL_ELSE -->&rsaquo; Acquisitions Statistics<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="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> <!-- TMPL_IF NAME="do_it" -->&rsaquo; <a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Acquisitions Statistics</a> &rsaquo; Results<!-- TMPL_ELSE --> &rsaquo; Acquisitions Statistics <!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="do_it" -->
<!-- TMPL_LOOP NAME="mainloop" -->
<h1>Acquisitions statistics </h1>
<!-- TMPL_IF NAME="loopfilter" -->
<p><b>Filtered on:</b></p>
<!-- TMPL_LOOP NAME="loopfilter" -->
<p><!-- TMPL_VAR NAME="crit"-->: <!-- TMPL_VAR NAME="filter" --></p>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF-->
<table>
<tr >
<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
<!-- TMPL_LOOP NAME="loopcol" -->
<th><!-- TMPL_VAR NAME="coltitle" --></th>
<!-- /TMPL_LOOP -->
<th>TOTAL</th>
</tr>
<!-- TMPL_LOOP NAME="looprow" -->
<tr>
<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="rowtitle" --></td>
<!-- TMPL_LOOP NAME="loopcell" -->
<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
<!-- TMPL_IF Name="value" --><!-- TMPL_VAR NAME="value" -->
<!-- TMPL_ELSE--> &nbsp;
<!-- /TMPL_IF -->
</td>
<!-- /TMPL_LOOP -->
<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="totalrow" -->
</td>
</tr>
<!-- /TMPL_LOOP -->
<tr >
<th>TOTAL</th>
<!-- TMPL_LOOP NAME="loopfooter" -->
<th>
<!-- TMPL_VAR NAME="totalcol" -->
</th>
<!-- /TMPL_LOOP -->
<th><!-- TMPL_VAR NAME="total" --></th>
</tr>
</table>
<!-- /TMPL_LOOP -->
<!-- TMPL_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="<!-- TMPL_VAR Name="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 : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "openCalendarFrom",
disableFunc : validate1,
dateStatusFunc : validate1
}
);
//]]>
</script>
To <input size="10" id="to" name="Filter" type="text" value="" />
<img src="<!-- TMPL_VAR Name="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 : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "openCalendarTo",
disableFunc : validate2,
dateStatusFunc : validate2
}
);
//]]>
</script>
</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="<!-- TMPL_VAR Name="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 : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "openCalendarFromRO",
disableFunc : validate1,
dateStatusFunc : validate1
}
);
//]]>
</script>
To <input type="text" size="10" id="toRO" name="Filter" value="" />
<img src="<!-- TMPL_VAR Name="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 : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "openCalendarToRO",
disableFunc : validate2,
dateStatusFunc : validate2
}
);
//]]>
</script>
</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>Supplier</td>
<td><input type="radio" checked="checked" name="Line" value="aqbooksellers.name" /></td>
<td><input type="radio" name="Column" value="aqbooksellers.name" /></td>
<td><!-- TMPL_VAR NAME="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><!-- TMPL_VAR NAME="CGIItemType" --></td>
</tr>
<tr>
<td>Budget</td>
<td><input type="radio" name="Line" value="aqorderbreakdown.bookfundid" /></td>
<td><input type="radio" name="Column" value="aqorderbreakdown.bookfundid" /></td>
<td><!-- TMPL_VAR NAME="CGIBudget" --></td>
</tr>
<!-- TMPL_IF Name="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><!-- TMPL_VAR NAME="CGISort1" --> </td>
</tr>
<!-- /TMPL_IF -->
<!-- TMPL_IF Name="hassort2" -->
<!-- TMPL_IF Name="HglghtSort2"--><tr class="hilighted"> <!-- TMPL_ELSE --><tr><!--/TMPL_IF -->
<td>Sort2</td>
<td><input type="radio" name="Line" value="aqorders.sort2" /></td>
<td><input type="radio" name="Column" value="aqorders.sort2" /></td>
<td><!-- TMPL_VAR NAME="CGISort2" --> </td>
</tr>
<!-- /TMPL_IF -->
</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><!-- TMPL_VAR NAME="CGIextChoice" -->
<!-- TMPL_VAR NAME="CGIsepChoice" --></li></ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
<input type="hidden" name="do_it" value="1" />
</fieldset>
</form>
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="reports-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->