Bug 6121: Holds awaiting pickup
authorChristophe Croullebois <christophe.croullebois@biblibre.com>
Tue, 8 Feb 2011 16:58:54 +0000 (17:58 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 4 Sep 2011 08:03:37 +0000 (20:03 +1200)
On holds over, when cancelling hold and returning to his branch a bug fill the branchtransfers.tobranch field with the branchname instead of the branch code.

BibLibre MT5647

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

circ/waitingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt

index c2f868d..128d1eb 100755 (executable)
@@ -125,7 +125,8 @@ foreach my $num (@getreserves) {
     $getreserv{'itemnumber'}     = $gettitle->{'itemnumber'};
     $getreserv{'biblionumber'}   = $gettitle->{'biblionumber'};
     $getreserv{'barcode'}        = $gettitle->{'barcode'};
-    $getreserv{'homebranch'}     = GetBranchName($gettitle->{'homebranch'});
+    $getreserv{'branchname'}     = GetBranchName($gettitle->{'homebranch'});
+    $getreserv{'homebranch'}     = $gettitle->{'homebranch'};
     $getreserv{'holdingbranch'}  = $gettitle->{'holdingbranch'};
     $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
     if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) {
index 39400bf..6bfe480 100644 (file)
@@ -102,7 +102,7 @@ $.tablesorter.addParser({
                             <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" />
                             <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" />
                             [% IF ( reserveloo.dotransfer ) %]
-                            <input type="submit" value="Cancel hold and return to : [% reserveloo.homebranch %]" /> 
+                            <input type="submit" value="Cancel hold and return to : [% reserveloo.branchname %]" /> 
                             [% ELSE %]
                             <input type="submit" value="Cancel hold" />
                             [% END %]
@@ -129,7 +129,7 @@ $.tablesorter.addParser({
                <tbody>[% FOREACH overloo IN overloop %]
                     <tr>
                         <td><p>[% overloo.waitingdate %]</p></td>
-                        <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %] [% overloo.subtitle |html %]
+                        <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% overloo.title |html %] [% overloo.subtitle |html %]
                         </a>
                             [% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %]&nbsp; (<b>[% overloo.itemtype %]</b>)[% END %][% END %]
                         <br />Barcode: [% overloo.barcode %]
@@ -145,7 +145,7 @@ $.tablesorter.addParser({
                             <input type="hidden" name="fbr" value="[% overloo.holdingbranch %]" />
                             <input type="hidden" name="tbr" value="[% overloo.homebranch %]" />
                             [% IF ( overloo.dotransfer ) %]
-                            <input type="submit" value="Cancel hold and return to : [% overloo.homebranch %]" />
+                            <input type="submit" value="Cancel hold and return to : [% overloo.branchname %]" />
                             [% ELSE %]
                             <input type="submit" value="Cancel hold" />
                             [% END %]