}
# actually return book and prepare item table.....
+my $returnbranch;
if ($barcode) {
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
$barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
# make sure return branch respects home branch circulation rules, default to homebranch
my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype ? $itemtype->itemtype : undef )->{'returnbranch'} || "homebranch";
- my $returnbranch = $biblio->{$hbr} ;
+ $returnbranch = $biblio->{$hbr};
my $materials = $biblio->{'materials'};
my $avcode = GetAuthValCode('items.materials');
if ( $itemnumber ) {
my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
$holdingBranch //= '';
- $collectionBranch //= '';
+ $collectionBranch //= $returnbranch;
if ( ! ( $holdingBranch eq $collectionBranch ) ) {
$template->param(
collectionItemNeedsTransferred => 1,
- collectionBranch => GetBranchName($collectionBranch),
+ collectionBranchName => GetBranchName($collectionBranch),
+ collectionBranch => $collectionBranch,
itemnumber => $itemnumber,
);
}
[% IF ( collectionItemNeedsTransferred ) %]
<div id="rotating-collection" class="dialog message">
- <h3>Please transfer item to: [% collectionBranch %]</h3>
+ <h3>Please transfer item to: [% collectionBranchName %]</h3>
<p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
<p>This item is part of a rotating collection.</p>
- <p><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% returnbranch %]&op=slip'); return true;">Print slip</a></p>
+ <p><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% collectionBranch %]&op=slip'); return true;">Print slip</a></p>
</div>
[% END %]