@@ -, +, @@ return branch if it is empty. --- circ/returns.pl | 8 +++++--- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) --- a/circ/returns.pl +++ a/circ/returns.pl @@ -249,6 +249,7 @@ if ($canceltransfer){ } # 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'); @@ -275,7 +276,7 @@ if ($barcode) { # 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'); @@ -641,11 +642,12 @@ $itemnumber = GetItemnumberFromBarcode( $barcode ); 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, ); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -146,10 +146,10 @@ $(document).ready(function () { [% IF ( collectionItemNeedsTransferred ) %]
-

Please transfer item to: [% collectionBranch %]

+

Please transfer item to: [% collectionBranchName %]

[% itembarcode |html %]: [% title |html %]

This item is part of a rotating collection.

-

Print slip

+

Print slip

[% END %] --