[Koha-cvs] CVS: koha/reports issues_by_borrower_category.plugin,1.2.2.2,1.2.2.3
Henri-Damien LAURENT
hdl at users.sourceforge.net
Fri Oct 14 11:34:18 CEST 2005
Update of /cvsroot/koha/koha/reports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040/reports
Modified Files:
Tag: rel_2_2
issues_by_borrower_category.plugin
Log Message:
Adding borrowers branchcode management
Index: issues_by_borrower_category.plugin
===================================================================
RCS file: /cvsroot/koha/koha/reports/issues_by_borrower_category.plugin,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -r1.2.2.2 -r1.2.2.3
*** issues_by_borrower_category.plugin 7 Apr 2005 12:18:43 -0000 1.2.2.2
--- issues_by_borrower_category.plugin 14 Oct 2005 09:34:16 -0000 1.2.2.3
***************
*** 101,111 ****
}
# now, parse each category. Before filling the result array, fill it with 0 to have every itemtype column.
! my $sth = $dbh->prepare("SELECT itemtype, count( * )
FROM issues, borrowers, biblioitems, items
WHERE issues.borrowernumber = borrowers.borrowernumber
AND items.itemnumber = issues.itemnumber
AND biblioitems.biblionumber = items.biblionumber
! AND borrowers.categorycode = ?
! GROUP BY biblioitems.itemtype");
my $sthcategories = $dbh->prepare("select categorycode,description from categories");
$sthcategories->execute;
--- 101,113 ----
}
# now, parse each category. Before filling the result array, fill it with 0 to have every itemtype column.
! my $strsth="SELECT itemtype, count( * )
FROM issues, borrowers, biblioitems, items
WHERE issues.borrowernumber = borrowers.borrowernumber
AND items.itemnumber = issues.itemnumber
AND biblioitems.biblionumber = items.biblionumber
! AND borrowers.categorycode = ?";
! $strsth.= " AND borrowers.branchcode = ".$dbh->quote($branch) if ($branch);
! $strsth .= " GROUP BY biblioitems.itemtype";
! my $sth = $dbh->prepare($strsth);
my $sthcategories = $dbh->prepare("select categorycode,description from categories");
$sthcategories->execute;
More information about the Koha-cvs
mailing list