@@ -, +, @@ --- circ/branchtransfers.pl | 44 +++++-------------- .../prog/en/modules/circ/branchtransfers.tt | 28 +++++++----- 2 files changed, 28 insertions(+), 44 deletions(-) --- a/circ/branchtransfers.pl +++ a/circ/branchtransfers.pl @@ -131,50 +131,30 @@ if ($barcode) { my $item = Koha::Items->find({ barcode => $barcode }); $found = $messages->{'ResFound'}; if ($transferred) { - my %item; - my $biblio = $item->biblio; + my %trsfitem; my $frbranchcd = C4::Context->userenv->{'branch'}; - $item{'biblionumber'} = $item->biblionumber; - $item{'itemnumber'} = $item->itemnumber; - $item{'title'} = $biblio->title; - $item{'author'} = $biblio->author; - $item{'itemtype'} = $biblio->biblioitem->itemtype; - $item{'ccode'} = $item->ccode; - $item{'itemcallnumber'} = $item->itemcallnumber; - my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); - $item{'location'} = $av->count ? $av->next->lib : ''; - $item{counter} = 0; - $item{barcode} = $barcode; - $item{frombrcd} = $frbranchcd; - $item{tobrcd} = $tobranchcd; - push( @trsfitemloop, \%item ); + $trsfitem{item} = $item; + $trsfitem{counter} = 0; + $trsfitem{frombrcd} = $frbranchcd; + $trsfitem{tobrcd} = $tobranchcd; + push( @trsfitemloop, \%trsfitem ); } } foreach ( $query->param ) { (next) unless (/bc-(\d*)/); my $counter = $1; - my %item; + my %trsfitem; my $bc = $query->param("bc-$counter"); my $frbcd = $query->param("fb-$counter"); my $tobcd = $query->param("tb-$counter"); $counter++; - $item{counter} = $counter; - $item{barcode} = $bc; - $item{frombrcd} = $frbcd; - $item{tobrcd} = $tobcd; + $trsfitem{counter} = $counter; + $trsfitem{frombrcd} = $frbcd; + $trsfitem{tobrcd} = $tobcd; my $item = Koha::Items->find({ barcode => $bc }); - my $biblio = $item->biblio; - $item{'biblionumber'} = $item->biblionumber; - $item{'itemnumber'} = $item->itemnumber; - $item{'title'} = $biblio->title; - $item{'author'} = $biblio->author; - $item{'itemtype'} = $biblio->biblioitem->itemtype; - $item{'ccode'} = $item->ccode; - $item{'itemcallnumber'} = $item->itemcallnumber; - my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); - $item{'location'} = $av->count ? $av->next->lib : ''; - push( @trsfitemloop, \%item ); + $trsfitem{item} = $item; + push( @trsfitemloop, \%trsfitem ); } my $itemnumber; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -40,7 +40,7 @@
[% FOREACH trsfitemloo IN trsfitemloop %] - + [% END %] @@ -65,7 +65,7 @@ [% FOREACH trsfitemloo IN trsfitemloop %] - + [% END %] @@ -82,11 +82,11 @@ Ignore and return to transfers: - + [% FOREACH trsfitemloo IN trsfitemloop %] - + [% END %] @@ -164,7 +164,7 @@ [% FOREACH trsfitemloo IN trsfitemloop %] - + [% END %] @@ -186,13 +186,17 @@ [% FOREACH trsfitemloo IN trsfitemloop %] - [% trsfitemloo.title | html %] - [% trsfitemloo.author | html %] - [% trsfitemloo.barcode | html %] - [% trsfitemloo.location | html %] - [% trsfitemloo.itemcallnumber | html %] - [% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %] - [% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %] + + [% INCLUDE 'biblio-default-view.inc' biblionumber = trsfitemloo.item.biblionumber %] + [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio %] + + + [% trsfitemloo.item.biblio.author | html %] + [% trsfitemloo.item.barcode | html %] + [% AuthorisedValues.GetByCode( 'LOC', trsfitemloo.item.location ) | html %] + [% trsfitemloo.item.itemcallnumber | html %] + [% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %] + [% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.item.ccode ) | html %] [% Branches.GetName( trsfitemloo.tobrcd ) | html %] [% END %] --