From 8b80b315c3689bd58bee4cb5fc3c0d843bd080eb Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Thu, 9 Feb 2012 13:24:35 +1300 Subject: [PATCH] bug_7201: Holds reports: add copynumber and enumchron Signed-off-by: Liz Rea Data is there and correct - very helpful patch, thanks! passes prove t xt t/db_dependent in line with current master failures. Signed-off-by: Paul Poulain --- circ/pendingreserves.pl | 8 +++++++- circ/view_holdsqueue.pl | 2 +- circ/waitingreserves.pl | 2 ++ .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 8 ++++++++ .../intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 6 +++++- .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 8 ++++++++ 6 files changed, 31 insertions(+), 3 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index cf71094830..d723bc25bf 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -134,13 +134,16 @@ if ( $run_report ) { GROUP_CONCAT(DISTINCT reserves.branchcode ORDER BY items.itemnumber SEPARATOR ', ') l_branch, items.holdingbranch as branch, - items.itemcallnumber, GROUP_CONCAT(DISTINCT items.itype ORDER BY items.itemnumber SEPARATOR '
') l_itype, GROUP_CONCAT(DISTINCT items.location ORDER BY items.itemnumber SEPARATOR '
') l_location, GROUP_CONCAT(DISTINCT items.itemcallnumber ORDER BY items.itemnumber SEPARATOR '
') l_itemcallnumber, + GROUP_CONCAT(DISTINCT items.enumchron + ORDER BY items.itemnumber SEPARATOR '
') l_enumchron, + GROUP_CONCAT(DISTINCT items.copynumber + ORDER BY items.itemnumber SEPARATOR '
') l_copynumber, items.itemnumber, notes, notificationdate, @@ -159,6 +162,7 @@ if ( $run_report ) { WHERE reserves.found IS NULL $sqldatewhere + AND (reserves.itemnumber IS NULL OR reserves.itemnumber = items.itemnumber) AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL) AND issues.itemnumber IS NULL AND reserves.priority <> 0 @@ -200,6 +204,8 @@ if ( $run_report ) { holdingbranch => $data->{l_holdingbranch}, branch => $data->{l_branch}, itemcallnumber => $data->{l_itemcallnumber}, + enumchron => $data->{l_enumchron}, + copyno => $data->{l_copynumber}, notes => $data->{notes}, notificationdate => $data->{notificationdate}, reminderdate => $data->{reminderdate}, diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index 3023cdf43a..4b514239a4 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -81,7 +81,7 @@ sub GetHoldsQueueItems { my $dbh = C4::Context->dbh; my @bind_params = (); - my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn + my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn,items.copynumber FROM tmp_holdsqueue JOIN biblio USING (biblionumber) LEFT JOIN biblioitems USING (biblionumber) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 128d1eb2a4..039a0d036d 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -129,6 +129,8 @@ foreach my $num (@getreserves) { $getreserv{'homebranch'} = $gettitle->{'homebranch'}; $getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; + $getreserv{'enumchron'} = $gettitle->{'enumchron'}; + $getreserv{'copynumber'} = $gettitle->{'copynumber'}; if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) { $getreserv{'dotransfer'} = 1; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 5668a75324..613dd98342 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -71,6 +71,12 @@ $.tablesorter.addParser({ Available Call Numbers Sort + + Available Copy No + + + Available Enumeration + Available Itypes Sort @@ -131,6 +137,8 @@ $.tablesorter.addParser({ [% END %]

[% reserveloo.holdingbranch %]

[% reserveloo.itemcallnumber %]

+

[% reserveloo.copyno %]

+

[% reserveloo.enumchron %]

[% reserveloo.itype %]

[% reserveloo.location %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index 8f0d9cb17d..d9ba8fcda7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -46,6 +46,8 @@ $(document).ready(function() { Title Collection Call Number + Copy Number + Enumeration Barcode Patron Send To @@ -65,7 +67,9 @@ $(document).ready(function() { [% itemsloo.ccode %] - [% itemsloo.location %] [% itemsloo.itemcallnumber %] [% itemsloo.enumchron %] + [% itemsloo.location %] [% itemsloo.itemcallnumber %] + [% itemsloo.copynumber %] + [% itemsloo.enumchron %] [% IF ( itemsloo.item_level_request ) %] Only Item: [% itemsloo.barcode %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 7ecc3a14ac..d5b7bbf451 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -79,6 +79,8 @@ $.tablesorter.addParser({ Title Patron Location + Copy Number + Enumeration Action [% FOREACH reserveloo IN reserveloop %] @@ -95,6 +97,8 @@ $.tablesorter.addParser({ [% reserveloo.borrowermail %][% END %] [% reserveloo.homebranch %]
[% reserveloo.itemcallnumber %] + [% reserveloo.copynumber %] + [% reserveloo.enumchron %]
@@ -124,6 +128,8 @@ $.tablesorter.addParser({ Title Patron Location + Copy Number + Enumeration Action [% FOREACH overloo IN overloop %] @@ -139,6 +145,8 @@ $.tablesorter.addParser({ [% overloo.borrowermail %][% END %] [% overloo.homebranch %] [% overloo.itemcallnumber %] + [% overloo.copynumber %] + [% overloo.enumchron %] -- 2.39.5