From 11474fac41859a44fd86926a6e0b826b55358155 Mon Sep 17 00:00:00 2001 From: hdl Date: Fri, 9 Sep 2005 08:50:21 +0000 Subject: [PATCH] Adding count items/Count borrowers to stats on issues for statistics. --- .../intranet-tmpl/default/en/reports/issues_stats.tmpl | 4 +++- reports/issues_stats.pl | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/reports/issues_stats.tmpl b/koha-tmpl/intranet-tmpl/default/en/reports/issues_stats.tmpl index 2501751f44..b569e38d8c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/reports/issues_stats.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/reports/issues_stats.tmpl @@ -205,7 +205,9 @@

Cell value

Count issues

-

Circulation rate

+

Count borrowers

+

Count Items

+

Circulation rate

Output

diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 56156e4ae9..02682520d3 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -443,7 +443,13 @@ sub calculate { $strcalc .= "SELECT $linefield, $colfield, "; $strcalc .= "COUNT( * ) " if ($process ==1); + if ($process ==2){ + $strcalc .= "(COUNT(DISTINCT borrowers.borrowernumber))" ; + } if ($process ==3){ + $strcalc .= "(COUNT(DISTINCT itemnumber))" ; + } + if ($process ==4){ my $rqbookcount = $dbh->prepare("SELECT count(*) FROM items"); $rqbookcount->execute; my ($bookcount) = $rqbookcount->fetchrow; -- 2.39.5