bug_7201: Holds reports: add copynumber and enumchron

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
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 <paul.poulain@biblibre.com>
This commit is contained in:
Srdjan Jankovic 2012-02-09 13:24:35 +13:00 committed by Paul Poulain
parent 4490650e2f
commit 8b80b315c3
6 changed files with 31 additions and 3 deletions

View file

@ -134,13 +134,16 @@ if ( $run_report ) {
GROUP_CONCAT(DISTINCT reserves.branchcode GROUP_CONCAT(DISTINCT reserves.branchcode
ORDER BY items.itemnumber SEPARATOR ', ') l_branch, ORDER BY items.itemnumber SEPARATOR ', ') l_branch,
items.holdingbranch as branch, items.holdingbranch as branch,
items.itemcallnumber,
GROUP_CONCAT(DISTINCT items.itype GROUP_CONCAT(DISTINCT items.itype
ORDER BY items.itemnumber SEPARATOR '<br/>') l_itype, ORDER BY items.itemnumber SEPARATOR '<br/>') l_itype,
GROUP_CONCAT(DISTINCT items.location GROUP_CONCAT(DISTINCT items.location
ORDER BY items.itemnumber SEPARATOR '<br/>') l_location, ORDER BY items.itemnumber SEPARATOR '<br/>') l_location,
GROUP_CONCAT(DISTINCT items.itemcallnumber GROUP_CONCAT(DISTINCT items.itemcallnumber
ORDER BY items.itemnumber SEPARATOR '<br/>') l_itemcallnumber, ORDER BY items.itemnumber SEPARATOR '<br/>') l_itemcallnumber,
GROUP_CONCAT(DISTINCT items.enumchron
ORDER BY items.itemnumber SEPARATOR '<br/>') l_enumchron,
GROUP_CONCAT(DISTINCT items.copynumber
ORDER BY items.itemnumber SEPARATOR '<br/>') l_copynumber,
items.itemnumber, items.itemnumber,
notes, notes,
notificationdate, notificationdate,
@ -159,6 +162,7 @@ if ( $run_report ) {
WHERE WHERE
reserves.found IS NULL reserves.found IS NULL
$sqldatewhere $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 items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL)
AND issues.itemnumber IS NULL AND issues.itemnumber IS NULL
AND reserves.priority <> 0 AND reserves.priority <> 0
@ -200,6 +204,8 @@ if ( $run_report ) {
holdingbranch => $data->{l_holdingbranch}, holdingbranch => $data->{l_holdingbranch},
branch => $data->{l_branch}, branch => $data->{l_branch},
itemcallnumber => $data->{l_itemcallnumber}, itemcallnumber => $data->{l_itemcallnumber},
enumchron => $data->{l_enumchron},
copyno => $data->{l_copynumber},
notes => $data->{notes}, notes => $data->{notes},
notificationdate => $data->{notificationdate}, notificationdate => $data->{notificationdate},
reminderdate => $data->{reminderdate}, reminderdate => $data->{reminderdate},

View file

@ -81,7 +81,7 @@ sub GetHoldsQueueItems {
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my @bind_params = (); 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 FROM tmp_holdsqueue
JOIN biblio USING (biblionumber) JOIN biblio USING (biblionumber)
LEFT JOIN biblioitems USING (biblionumber) LEFT JOIN biblioitems USING (biblionumber)

View file

@ -129,6 +129,8 @@ foreach my $num (@getreserves) {
$getreserv{'homebranch'} = $gettitle->{'homebranch'}; $getreserv{'homebranch'} = $gettitle->{'homebranch'};
$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; $getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'};
$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
$getreserv{'enumchron'} = $gettitle->{'enumchron'};
$getreserv{'copynumber'} = $gettitle->{'copynumber'};
if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) { if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) {
$getreserv{'dotransfer'} = 1; $getreserv{'dotransfer'} = 1;
} }

View file

@ -71,6 +71,12 @@ $.tablesorter.addParser({
Available Call Numbers Available Call Numbers
<a href="/cgi-bin/koha/circ/pendingreserves.pl?order=call&amp;from=[% from %]&amp;to=[% to %]">Sort</a> <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=call&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th> </th>
<th>
Available Copy No
</th>
<th>
Available Enumeration
</th>
<th> <th>
Available Itypes Available Itypes
<a href="/cgi-bin/koha/circ/pendingreserves.pl?order=itype&amp;from=[% from %]&amp;to=[% to %]">Sort</a> <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=itype&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
@ -131,6 +137,8 @@ $.tablesorter.addParser({
[% END %] [% END %]
<td><p>[% reserveloo.holdingbranch %]</p></td> <td><p>[% reserveloo.holdingbranch %]</p></td>
<td><p>[% reserveloo.itemcallnumber %]</p></td> <td><p>[% reserveloo.itemcallnumber %]</p></td>
<td><p>[% reserveloo.copyno %]</p></td>
<td><p>[% reserveloo.enumchron %]</p></td>
<td><p>[% reserveloo.itype %]</p></td> <td><p>[% reserveloo.itype %]</p></td>
<td><p>[% reserveloo.location %]</p></td> <td><p>[% reserveloo.location %]</p></td>
<td width="15%"> <td width="15%">

View file

@ -46,6 +46,8 @@ $(document).ready(function() {
<th class="hq-title">Title</th> <th class="hq-title">Title</th>
<th class="hq-collection">Collection</th> <th class="hq-collection">Collection</th>
<th class="hq-callnumber">Call Number</th> <th class="hq-callnumber">Call Number</th>
<th class="hq-copynumber">Copy Number</th>
<th class="hq-enumchron">Enumeration</th>
<th class="hq-barcode">Barcode</th> <th class="hq-barcode">Barcode</th>
<th class="hq-patron">Patron</th> <th class="hq-patron">Patron</th>
<th class="hq-sendto">Send To</th> <th class="hq-sendto">Send To</th>
@ -65,7 +67,9 @@ $(document).ready(function() {
</div> </div>
</td> </td>
<td class="hq-collection">[% itemsloo.ccode %]</td> <td class="hq-collection">[% itemsloo.ccode %]</td>
<td class="hq-callnumber">[% itemsloo.location %] [% itemsloo.itemcallnumber %] [% itemsloo.enumchron %]</td> <td class="hq-callnumber">[% itemsloo.location %] [% itemsloo.itemcallnumber %]</td>
<td class="hq-copynumber">[% itemsloo.copynumber %]</td>
<td class="hq-enumchron">[% itemsloo.enumchron %]</td>
<td class="hq-barcode"> <td class="hq-barcode">
[% IF ( itemsloo.item_level_request ) %] [% IF ( itemsloo.item_level_request ) %]
<em>Only Item:</em> <strong>[% itemsloo.barcode %]</strong> <em>Only Item:</em> <strong>[% itemsloo.barcode %]</strong>

View file

@ -79,6 +79,8 @@ $.tablesorter.addParser({
<th>Title</th> <th>Title</th>
<th>Patron</th> <th>Patron</th>
<th>Location</th> <th>Location</th>
<th>Copy Number</th>
<th>Enumeration</th>
<th>Action</th> <th>Action</th>
</tr></thead> </tr></thead>
<tbody>[% FOREACH reserveloo IN reserveloop %] <tbody>[% FOREACH reserveloo IN reserveloop %]
@ -95,6 +97,8 @@ $.tablesorter.addParser({
[% reserveloo.borrowermail %]</a>[% END %] [% reserveloo.borrowermail %]</a>[% END %]
</td> </td>
<td>[% reserveloo.homebranch %]<br />[% reserveloo.itemcallnumber %]</td> <td>[% reserveloo.homebranch %]<br />[% reserveloo.itemcallnumber %]</td>
<td>[% reserveloo.copynumber %]</td>
<td>[% reserveloo.enumchron %]</td>
<td> <td>
<form name="cancelReserve" action="waitingreserves.pl" method="post"> <form name="cancelReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" /> <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" />
@ -124,6 +128,8 @@ $.tablesorter.addParser({
<th>Title</th> <th>Title</th>
<th>Patron</th> <th>Patron</th>
<th>Location</th> <th>Location</th>
<th>Copy Number</th>
<th>Enumeration</th>
<th>Action</th> <th>Action</th>
</tr></thead> </tr></thead>
<tbody>[% FOREACH overloo IN overloop %] <tbody>[% FOREACH overloo IN overloop %]
@ -139,6 +145,8 @@ $.tablesorter.addParser({
[% overloo.borrowermail %]</a>[% END %] [% overloo.borrowermail %]</a>[% END %]
</td> </td>
<td>[% overloo.homebranch %] [% overloo.itemcallnumber %]</td> <td>[% overloo.homebranch %] [% overloo.itemcallnumber %]</td>
<td>[% overloo.copynumber %]</td>
<td>[% overloo.enumchron %]</td>
<td><form name="cancelReserve" action="waitingreserves.pl" method="post"> <td><form name="cancelReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" /> <input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" />
<input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" /> <input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" />