From 0da84bb4fea86a95b2366da81b06ff6a7466f41c Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Tue, 7 Oct 2008 15:58:07 -0600 Subject: [PATCH] Adding a few columns to members/readingrec.pl Add barcode and issues.renewals to members/readingrec.pl Had to change the query in C4/Members, items.renewals was squashing issues.renewals. Signed-off-by: Galen Charlton --- C4/Members.pm | 4 ++-- .../intranet-tmpl/prog/en/modules/members/readingrec.tmpl | 8 ++++++++ members/readingrec.pl | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 8a30ca636a..e756ffb7fb 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1049,14 +1049,14 @@ sub GetAllIssues { my $dbh = C4::Context->dbh; my $count = 0; my $query = - "SELECT *,items.timestamp AS itemstimestamp + "SELECT *,issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp FROM issues LEFT JOIN items on items.itemnumber=issues.itemnumber LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber WHERE borrowernumber=? UNION ALL - SELECT *,items.timestamp AS itemstimestamp + SELECT *,old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp FROM old_issues LEFT JOIN items on items.itemnumber=old_issues.itemnumber LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl index 42a7e793bc..c4abced859 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl @@ -28,6 +28,8 @@ &order=author&limit=">Author Call No. + Barcode + Number of Renewals &order=returndate DESC&limit=">Return Date @@ -51,6 +53,12 @@ + + + + + + diff --git a/members/readingrec.pl b/members/readingrec.pl index 2f853498b0..21d4f3ac64 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -73,6 +73,8 @@ for (my $i=0;$i<$count;$i++){ $line{classification} = $issues->[$i]->{'classification'} || $issues->[$i]->{'itemcallnumber'}; $line{date_due}=format_date($issues->[$i]->{'date_due'}); $line{returndate}=format_date($issues->[$i]->{'returndate'}); + $line{renewals}=$issues->[$i]->{'renewals'}; + $line{barcode}=$issues->[$i]->{'barcode'}; $line{volumeddesc}=$issues->[$i]->{'volumeddesc'}; push(@loop_reading,\%line); } -- 2.39.5