GetMarcBiblio
GetBiblioItemData
GetBiblioItemInfosOf
GetBiblioItemByBiblioNumber
&GetRecordValue
return ($data);
} # sub &GetBiblioItemData
=head2 GetBiblioItemByBiblioNumber
NOTE : This function has been copy/paste from C4/Biblio.pm from head before zebra integration.
=cut
sub GetBiblioItemByBiblioNumber {
my ($biblionumber) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("Select * FROM biblioitems WHERE biblionumber = ?");
my $count = 0;
my @results;
$sth->execute($biblionumber);
while ( my $data = $sth->fetchrow_hashref ) {
push @results, $data;
}
$sth->finish;
return @results;
=head2 GetISBDView
$isbd = &GetISBDView({
foreach my $biblionumber ( split( / /, $cgi->param('id') ) ) {
# Get the biblioitem from the biblionumber
my $biblioitem = ( GetBiblioItemByBiblioNumber( $biblionumber, undef ) )[0];
my $biblio = Koha::Biblios->find( $biblionumber );
if ( not $biblioitem->{'biblionumber'} ) {
my $biblioitem = $biblio->biblioitem;
if ( $biblioitem ) {
$biblioitem = $biblioitem->unblessed;
} else {
$biblioitem->{code} = "RecordNotFound";
# FIXME We should not need to process something else; next?
my $embed_items = 1;
# Get most of the needed data
my $biblioitemnumber = $biblioitem->{'biblioitemnumber'};
my $holds = $biblio->current_holds->unblessed;
my $issues = GetBiblioIssues($biblionumber);
my $items = GetItemsByBiblioitemnumber($biblioitemnumber);
foreach my $item (@$results) {
$item->{biblio} = Koha::Biblios->find( $item->{biblionumber} );
my $biblio = Koha::Biblios->find( $item->{biblionumber} );
($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber});
$item->{biblio} = $biblio;
$item->{biblioitem} = $biblio->biblioitem->unblessed;
$item->{status} = $notforloan_map->{$item->{notforloan}};
if (defined $item->{location}) {
$item->{location} = $location_map->{$item->{location}};
# Moving orders (orders linked to items of frombiblio have already been moved by MoveItemFromBiblio)
my @allorders = GetOrdersByBiblionumber($biblionumber);
my @tobiblioitem = GetBiblioItemByBiblioNumber ($ref_biblionumber);
my $tobiblioitem_biblioitemnumber = $tobiblioitem [0]-> {biblioitemnumber };
foreach my $myorder (@allorders) {
$myorder->{'biblionumber'} = $ref_biblionumber;
ModOrder ($myorder);
if($ok){
# get biblio information....
my $biblionumber = $subs->{'bibnum'};
my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblionumber);
my @itemresults = GetItemsInfo( $biblionumber );
my $branch = @itemresults ? $itemresults[0]->{'holdingbranch'} : $subs->{branchcode};
$library = Koha::Libraries->find($branch);
branchcode => $branch
});
AddReserve($branch,$routing->{borrowernumber},$biblionumber,\@bibitems,$routing->{ranking}, undef, undef, $notes,$title);
AddReserve($branch,$routing->{borrowernumber},$biblionumber,undef,$routing->{ranking}, undef, undef, $notes,$title);
-