use CGI;
use C4::Koha;
use C4::Biblio;
+use C4::Branch;
use C4::Items;
+use C4::Circulation;
use C4::Auth;
use C4::Output;
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
- my @items = &GetItemsLocationInfo( $biblionumber );
+ my @items = &GetItemsInfo( $biblionumber );
my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
my $hasauthors = 0;
$hasauthors = 1;
}
my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
+ my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
# COinS format FIXME: for books Only
my $coins_format;
$dat->{'even'} = 1;
}
+my $branches = GetBranches();
+ for my $itm (@items) {
+ if ($itm->{'location'}){
+ $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} };
+ }
+ my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
+ if ( defined( $transfertwhen ) && $transfertwhen ne '' ) {
+ $itm->{transfertwhen} = $transfertwhen;
+ $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
+ $itm->{transfertto} = $branches->{$transfertto}{branchname};
+ }
+ }
$num++;
$dat->{biblionumber} = $biblionumber;
$dat->{ITEM_RESULTS} = \@items;