[Koha-patches] [PATCH] Add item call number to overdues report
Francis WANGA
f.wanga at tamil.fr
Thu Mar 5 17:31:59 CET 2009
/circ/overdue.pl displays book's title & author.
This patch appends items.itemcallnumber after
title when available.
---
circ/overdue.pl | 17 ++++++++++++++---
.../prog/en/modules/circ/overdue.tmpl | 2 +-
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/circ/overdue.pl b/circ/overdue.pl
index 7152d44..6808e65 100755
--- a/circ/overdue.pl
+++ b/circ/overdue.pl
@@ -132,9 +132,19 @@ my $todaysdate = sprintf("%-04.4d-%-02.2d-%02.2d",
Today());
$bornamefilter =~s/\*/\%/g;
$bornamefilter =~s/\?/\_/g;
-my $strsth="SELECT date_due,concat(surname,' ', firstname) as borrower,
- borrowers.phone, borrowers.email,issues.itemnumber, items.barcode,
biblio.title,
biblio.author,borrowers.borrowernumber,biblio.biblionumber,borrowers.branchcode
- FROM issues
+my $strsth="
+SELECT date_due,concat(surname,' ', firstname) AS borrower,
+ borrowers.phone,
+ borrowers.email,
+ issues.itemnumber,
+ items.barcode,
+ items.itemcallnumber,
+ biblio.title,
+ biblio.author,
+ borrowers.borrowernumber,
+ biblio.biblionumber,
+ borrowers.branchcode
+FROM issues
LEFT JOIN borrowers ON (issues.borrowernumber=borrowers.borrowernumber )
LEFT JOIN items ON (issues.itemnumber=items.itemnumber)
LEFT JOIN biblioitems ON
(biblioitems.biblioitemnumber=items.biblioitemnumber)
@@ -185,6 +195,7 @@ while (my $data=$sth->fetchrow_hashref) {
borrowernumber => $data->{borrowernumber},
barcode => $data->{barcode},
itemnum => $itemnum,
+ itemcallnumber => $data->{ itemcallnumber },
name => $name,
phone => $phone,
email => $email,
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl
b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl
index 1d10537..8743d8d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl
@@ -40,7 +40,7 @@
<!-- TMPL_ELSIF NAME="BiblioDefaultViewisbd" -->
<a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!--
TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR
NAME="title" escape="html" --></a>
<!-- TMPL_ELSE -->
-<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR
NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title"
escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- /TMPL_IF
--> <!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author"
--><!-- /TMPL_IF -->
+<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR
NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title"
escape="html" --></a><!-- /TMPL_IF --><!-- TMPL_IF NAME="itemcallnumber"
--> (<!-- TMPL_VAR NAME="itemcallnumber" -->)<!-- /TMPL_IF><!-- TMPL_IF
NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
</td>
</tr>
<!-- /TMPL_LOOP --></tbody>
--
1.5.6.5
More information about the Koha-patches
mailing list