[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/reports... [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/reports... [rel_2_2] |
Date: |
Mon, 19 Dec 2005 10:27:48 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <address@hidden> 05/12/19 10:27:48
Modified files:
koha-tmpl/intranet-tmpl/default/en/reports: borrowers_out.tmpl
reports : borrowers_out.pl
Log message:
Adding selection list for bor cat.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl.diff?only_with_tag=rel_2_2&tr1=1.1.2.2&tr2=1.1.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/borrowers_out.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.3&tr2=1.1.2.4&r1=text&r2=text
Patches:
Index: koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl
diff -u
koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl:1.1.2.2
koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl:1.1.2.3
--- koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl:1.1.2.2
Fri May 20 09:39:27 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/reports/borrowers_out.tmpl Mon Dec
19 10:27:48 2005
@@ -70,7 +70,15 @@
<td> </td>
<td> </td>
<td>Borrower Category</td>
- <td><input type="text" name="Filter"
value=""></td>
+ <td>
+ <select name="Filter">
+ <option value="">All Borrower
Categories</option>
+ <!-- TMPL_LOOP
name="borcatloop" -->
+ <option value="<!--
TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!--
/TMPL_IF -->><!-- TMPL_VAR name
+ ="description" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ </td>
</tr>
<tr class="hilighted">
<td> </td>
Index: koha/reports/borrowers_out.pl
diff -u koha/reports/borrowers_out.pl:1.1.2.3
koha/reports/borrowers_out.pl:1.1.2.4
--- koha/reports/borrowers_out.pl:1.1.2.3 Mon May 30 08:15:52 2005
+++ koha/reports/borrowers_out.pl Mon Dec 19 10:27:48 2005
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: borrowers_out.pl,v 1.1.2.3 2005/05/30 08:15:52 hdl Exp $
+# $Id: borrowers_out.pl,v 1.1.2.4 2005/12/19 10:27:48 hdl Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -133,9 +133,22 @@
-size => 1,
-multiple => 0 );
+ my ($codes,$labels) = borrowercategories;
+ my @borcatloop;
+ foreach my $thisborcat (sort keys %$labels) {
+ # my $selected = 1 if $thisbranch eq $branch;
+ my %row =(value => $thisborcat,
+ #
selected => $selected,
+
description => $labels->{$thisborcat},
+ );
+ push @borcatloop, \%row;
+ }
+
+
$template->param(
CGIextChoice => $CGIextChoice,
- CGIsepChoice => $CGIsepChoice
+ CGIsepChoice => $CGIsepChoice,
+ borcatloop =>address@hidden,
);
output_html_with_http_headers $input, $cookie, $template->output;
}
@@ -237,17 +250,22 @@
@$filters[0]=~ s/\*/%/g if (@$filters[0]);
$strcalc .= " AND borrowers.categorycode like '" . @$filters[0] ."'" if
( @$filters[0] );
if (@$filters[1]){
- my $queryfilter = $dbh->prepare("SELECT DISTINCT borrowernumber
FROM issues where issues.timestamp>?");
- $queryfilter->execute(@$filters[1]);
- while (my ($bornum)=$queryfilter->fetchrow){
- $strcalc .= " AND borrowers.borrowernumber <> $bornum ";
- }
+ my $strqueryfilter="SELECT DISTINCT borrowernumber FROM issues
where issues.timestamp> @$filters[1] ";
+ my $queryfilter = $dbh->prepare("SELECT DISTINCT borrowernumber
FROM issues where issues.timestamp> @$filters[1] ");
+ $strcalc .= " AND borrowers.borrowernumber not in
($strqueryfilter)";
+
+# $queryfilter->execute(@$filters[1]);
+# while (my ($bornum)=$queryfilter->fetchrow){
+# $strcalc .= " AND borrowers.borrowernumber <> $bornum ";
+# }
} else {
+ my $strqueryfilter="SELECT DISTINCT borrowernumber FROM issues
";
my $queryfilter = $dbh->prepare("SELECT DISTINCT borrowernumber
FROM issues ");
$queryfilter->execute;
- while (my ($bornum)=$queryfilter->fetchrow){
- $strcalc .= " AND borrowers.borrowernumber <> $bornum ";
- }
+ $strcalc .= " AND borrowers.borrowernumber not in
($strqueryfilter)";
+# while (my ($bornum)=$queryfilter->fetchrow){
+# $strcalc .= " AND borrowers.borrowernumber <> $bornum ";
+# }
}
$strcalc .= " group by borrowers.borrowernumber";
$strcalc .= ", $colfield" if ($column);
@@ -276,7 +294,7 @@
push @loopcol,{coltitle => "Global"} if not($column);
- my $max =(($line)?$line:@table);
+ my $max =(($line)?$line:@table -1);
for ($i=1; $i<=$max;$i++) {
my @loopcell;
address@hidden ensures the order for columns is common with
column titles