}
for my $order (@orders) {
my @row;
- my $bd = GetBiblioData( $order->{'biblionumber'} );
- my @biblioitems = GetBiblioItemByBiblioNumber( $order->{'biblionumber'});
- for my $biblioitem (@biblioitems) {
- if ( $biblioitem->{isbn}
- and $order->{isbn}
- and $biblioitem->{isbn} eq $order->{isbn} )
- {
- $order = { %$order, %$biblioitem };
- }
- }
+ my $biblio = Koha::Biblios->find( $order->{biblionumber} );
+ my $biblioitem = $biblio->biblioitem;
+ $order = { %$order, %{ $biblioitem->unblessed } };
if ($contract) {
$order = {%$order, %$contract};
}
- $order = {%$order, %$basket, %$bd};
+ $order = {%$order, %$basket, %{ $biblio->unblessed }};
for my $field (@fields) {
push @row, $order->{$field};
}
}
else {
foreach my $order (@orders) {
- my $bd = GetBiblioData( $order->{'biblionumber'} );
+ my $biblio = Koha::Biblios->find( $order->{biblionumber} );
+ my $biblioitem = $biblio->biblioitem;
my $row = {
contractname => $contract->{'contractname'},
ordernumber => $order->{'ordernumber'},
entrydate => $order->{'entrydate'},
isbn => $order->{'isbn'},
- author => $bd->{'author'},
- title => $bd->{'title'},
- publicationyear => $bd->{'publicationyear'},
- publishercode => $bd->{'publishercode'},
- collectiontitle => $bd->{'collectiontitle'},
+ author => $biblio->author,
+ title => $biblio->title,
+ publicationyear => $biblioitem->publicationyear,
+ publishercode => $biblioitem->publishercode,
+ collectiontitle => $biblioitem->collectiontitle,
notes => $order->{'order_vendornote'},
quantity => $order->{'quantity'},
rrp => $order->{'rrp'},
my $basketgroup = GetBasketgroup( $$basket{basketgroupid} );
foreach my $order (@orders) {
- my $bd = GetBiblioData( $order->{'biblionumber'} );
+ my $biblio = Koha::Biblios->find( $order->{biblionumber} );
+ my $biblioitem = $biblio->biblioitem;
my $row = {
clientnumber => $bookseller->accountnumber,
basketname => $basket->{basketname},
ordernumber => $order->{ordernumber},
- author => $bd->{author},
- title => $bd->{title},
- publishercode => $bd->{publishercode},
- publicationyear => $bd->{publicationyear},
- collectiontitle => $bd->{collectiontitle},
+ author => $biblio->author,
+ title => $biblio->title,
+ publishercode => $biblioitem->publishercode,
+ publicationyear => $biblioitem->publicationyear,
+ collectiontitle => $biblioitem->collectiontitle,
isbn => $order->{isbn},
quantity => $order->{quantity},
rrp_tax_included => $order->{rrp_tax_included},
carp "UpdateTotalIssues could not get biblio record";
return;
}
- my $data = GetBiblioData($biblionumber);
- unless ($data) {
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ unless ($biblio) {
carp "UpdateTotalIssues could not get datas of biblio";
return;
}
- my ($totalissuestag, $totalissuessubfield) = GetMarcFromKohaField('biblioitems.totalissues', $data->{'frameworkcode'});
+ my $biblioitem = $biblio->biblioitem;
+ my ($totalissuestag, $totalissuessubfield) = GetMarcFromKohaField('biblioitems.totalissues', $biblio->frameworkcode);
unless ($totalissuestag) {
return 1; # There is nothing to do
}
if (defined $value) {
$totalissues = $value;
} else {
- $totalissues = $data->{'totalissues'} + $increase;
+ $totalissues = $biblioitem->totalissues + $increase;
}
my $field = $record->field($totalissuestag);
$record->insert_grouped_field($field);
}
- return ModBiblio($record, $biblionumber, $data->{'frameworkcode'});
+ return ModBiblio($record, $biblionumber, $biblio->frameworkcode);
}
=head2 RemoveAllNsb
my $itemnumber = $item->{ itemnumber };
my $item_level_itypes = C4::Context->preference("item-level_itypes");
- my $biblio = $item_level_itypes ? undef : GetBiblioData( $item->{ biblionumber } ); # don't get bib data unless we need it
- my $itemtype = $item_level_itypes ? $item->{itype} : $biblio->{itemtype};
+ my $biblio = $item_level_itypes ? undef : Koha::Biblios->find( $item->{ biblionumber } ); # don't get bib data unless we need it
+ my $itemtype = $item_level_itypes ? $item->{itype} : $biblio->biblioitem->itemtype;
my $issue = Koha::Checkouts->find( { itemnumber => $itemnumber } );
if ( $issue ) {
my $firstname = $patron->firstname;
my $phone = $patron->phone;
- my $bib = GetBiblioData($biblionumber);
- my $title = $bib->{title};
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ my $title = $biblio->title;
$sth_load->execute($biblionumber, $itemnumber, $barcode, $surname, $firstname, $phone, $borrowernumber,
$cardnumber, $reservedate, $title, $itemcallnumber,
use C4::Letters;
use C4::Log;
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::Calendar;
use Koha::Database;
# we retrieve borrowers and items informations #
# item->{itype} will come for biblioitems if necessery
my $item = GetItem($itemnumber);
- my $biblioData = C4::Biblio::GetBiblioData( $item->{biblionumber} );
+ my $biblio = Koha::Biblios->find( $item->{biblionumber} );
my $patron = Koha::Patrons->find( $borrowernumber );
my $borrower = $patron->unblessed;
# Check for the age restriction
my ( $ageRestriction, $daysToAgeRestriction ) =
- C4::Circulation::GetAgeRestriction( $biblioData->{agerestriction}, $borrower );
+ C4::Circulation::GetAgeRestriction( $biblio->biblioitem->agerestriction, $borrower );
return 'ageRestricted' if $daysToAgeRestriction && $daysToAgeRestriction > 0;
# Check that the patron doesn't have an item level hold on this item already
use LWP::UserAgent;
use HTTP::Request::Common;
+use Koha::Biblios;
use Koha::SearchEngine;
use Koha::SearchEngine::Search;
my $biblionumber = C4::Biblio::get_koha_field_from_marc('biblio', 'biblionumber', $record, '');
return unless $biblionumber;
- my $xbiblio = GetBiblioData($biblionumber);
- return unless $xbiblio;
- $xbiblio->{normalized_isbn} = GetNormalizedISBN($xbiblio->{isbn});
- return $xbiblio;
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ return unless $biblio;
+ $biblio->{normalized_isbn} = GetNormalizedISBN($biblio->biblioitem->isbn);
+ return $biblio;
}
=head1 get_xisbns($isbn);
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/;
use Koha::EDI qw/create_edi_order get_edifact_ean/;
+use Koha::Biblioitems;
use Koha::Acquisition::Booksellers;
use Koha::ItemTypes;
use Koha::Patrons;
$ord->{total_tax_included} = $ord->{ecost_tax_included} * $ord->{quantity};
$ord->{total_tax_excluded} = $ord->{ecost_tax_excluded} * $ord->{quantity};
- my $bib = GetBiblioData($ord->{biblionumber});
+ my $biblioitem = Koha::Biblioitems->search({ biblionumber => $ord->{biblionumber} })->next;
#FIXME DELETE ME
# 0 1 2 3 4 5 6 7 8 9
}
}
- $ord->{itemtype} = ( $ord->{itemtype} and $bib->{itemtype} ) ? Koha::ItemTypes->find( $bib->{itemtype} )->description : undef;
+ $ord->{itemtype} = ( $ord->{itemtype} and $biblioitem->itemtype ) ? Koha::ItemTypes->find( $biblioitem->itemtype )->description : undef;
$ord->{en} = $en ? $en : undef;
$ord->{edition} = $edition ? $edition : undef;
use C4::ClassSource;
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
+use Koha::Biblios;
+
use Date::Calc qw(Today);
use MARC::File::XML;
-my $biblio = GetBiblioData($biblionumber);
-$template->param(bibliotitle => $biblio->{'title'});
+my $biblio = Koha::Biblios->find( $biblionumber );
+$template->param(bibliotitle => $biblio->title);
$template->param(biblionumber => $biblionumber);
# If we already have the barcode of the item to move and the biblionumber to move the item to
my @items =();
# This code needs to be refactored using these subs...
#my @items = &GetItemsInfo( $biblio->{biblionumber}, 'intra' );
- #my $dat = &GetBiblioData( $biblio->{biblionumber} );
for ( my $i = 0 ; $i < $hits ; $i++ ) {
my @row_data= ();
#DEBUG Notes: Decode the MARC record from each resulting MARC record...
use IO::File;
use Pod::Usage;
+use Koha::Biblios;
use Koha::SearchEngine;
use Koha::SearchEngine::Search;
}
# create biblio, unless we already have it ( either match or isbn )
if ($biblionumber) {
- eval{$biblioitemnumber=GetBiblioData($biblionumber)->{biblioitemnumber};};
+ eval{
+ $biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber;
+ };
if ($update) {
eval { ( $biblionumber, $biblioitemnumber ) = ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) };
if ($@) {
use C4::Context;
use C4::Biblio;
use C4::Koha qw( GetVariationsOfISBN );
+
+use Koha::Biblios;
use Koha::Database;
binmode STDOUT, ':encoding(UTF-8)';
say "Found matching record! Biblionumber: $biblionumber";
if ( $verbose > 2 ) {
- my $biblio = GetBiblioData($biblionumber);
- say "Title from record: " . $biblio->{title}
- if ( $biblio->{title} );
- say "Author from record: " . $biblio->{author}
- if ( $biblio->{author} );
- say "ISBN from record: " . $biblio->{isbn}
- if ( $biblio->{isbn} );
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ say "Title from record: " . $biblio->title
+ if $biblio->title;
+ say "Author from record: " . $biblio->author
+ if $biblio->author;
+ say "ISBN from record: " . $biblio->biblioitem->isbn
+ if $biblio->biblioitem->isbn;
}
say "Title: " . $row->{Title};
say "Author: " . $row->{Author};
use C4::Acquisition;
use C4::Koha;
use List::MoreUtils qw( any uniq );
+use Koha::Biblios;
use Koha::Patrons;
use Koha::RecordProcessor;
my $framework = &GetFrameworkCode( $biblionumber );
my $tagslib = &GetMarcStructure( 0, $framework );
my ($tag_itemnumber,$subtag_itemnumber) = &GetMarcFromKohaField('items.itemnumber',$framework);
-my $biblio = GetBiblioData($biblionumber);
+my $biblio = Koha::Biblios->find( $biblionumber );
my $record_processor = Koha::RecordProcessor->new({
filters => 'ViewPolicy',
my ($bt_tag,$bt_subtag) = GetMarcFromKohaField('biblio.title',$framework);
$template->param(
- bibliotitle => $biblio->{title},
+ bibliotitle => $biblio->title,
) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0 && # <=0 OPAC visible.
$tagslib->{$bt_tag}->{$bt_subtag}->{hidden} > -8; # except -8;
use C4::Output;
use C4::Auth;
+use Koha::Biblios;
use Koha::Virtualshelves;
my $query = new CGI;
if ($authorized) {
for my $biblionumber (@biblionumbers) {
- my $data = GetBiblioData($biblionumber);
+ my $biblio = Koha::Biblios->find( $biblionumber );
push(
@biblios,
{ biblionumber => $biblionumber,
- title => $data->{'title'},
- author => $data->{'author'},
+ title => $biblio->title,
+ author => $biblio->author,
}
);
}
use Koha::DateUtils;
use C4::HTML5Media;
use C4::CourseReserves qw(GetItemCourseReservesInfo);
+
+use Koha::Biblios;
use Koha::RecordProcessor;
use Koha::AuthorisedValues;
use Koha::Biblios;
$numberBiblioPaging = $paging{'previous'}->{biblionumber};
if ($numberBiblioPaging) {
$template->param( 'previousBiblionumber' => $numberBiblioPaging );
- $dataBiblioPaging = GetBiblioData($numberBiblioPaging);
- $template->param('previousTitle' => $dataBiblioPaging->{'title'}) if ($dataBiblioPaging);
+ $dataBiblioPaging = Koha::Biblios->find( $numberBiblioPaging );
+ $template->param('previousTitle' => $dataBiblioPaging->title) if $dataBiblioPaging;
}
# Next biblio
$numberBiblioPaging = $paging{'next'}->{biblionumber};
if ($numberBiblioPaging) {
$template->param( 'nextBiblionumber' => $numberBiblioPaging );
- $dataBiblioPaging = GetBiblioData($numberBiblioPaging);
- $template->param('nextTitle' => $dataBiblioPaging->{'title'}) if ($dataBiblioPaging);
+ $dataBiblioPaging = Koha::Biblios->find( $numberBiblioPaging );
+ $template->param('nextTitle' => $dataBiblioPaging->title) if $dataBiblioPaging;
}
# Partial list of biblio results
my @listResults;
for (my $j = 0; $j < @arrBiblios; $j++) {
next unless ($arrBiblios[$j]);
- $dataBiblioPaging = GetBiblioData($arrBiblios[$j]) if ($arrBiblios[$j] != $biblionumber);
- push @listResults, {index => $j + 1 + $offset, biblionumber => $arrBiblios[$j], title => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->{title}, author => ($arrBiblios[$j] != $biblionumber && $dataBiblioPaging->{author})?$dataBiblioPaging->{author}:'', url => ($arrBiblios[$j] == $biblionumber)?'':'opac-detail.pl?biblionumber=' . $arrBiblios[$j]};
+ $dataBiblioPaging = Koha::Biblios->find( $arrBiblios[$j] ) if ($arrBiblios[$j] != $biblionumber);
+ push @listResults, {index => $j + 1 + $offset, biblionumber => $arrBiblios[$j], title => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->title, author => ($arrBiblios[$j] != $biblionumber && $dataBiblioPaging->author)?$dataBiblioPaging->author:'', url => ($arrBiblios[$j] == $biblionumber)?'':'opac-detail.pl?biblionumber=' . $arrBiblios[$j]};
}
$template->param('listResults' => \@listResults) if (@listResults);
$template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset);
use C4::Members;
use C4::Overdues;
use C4::Debug;
+
use Koha::AuthorisedValues;
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::Items;
use Koha::ItemTypes;
if ( $itemInfo->{biblionumber} ne $biblioNum ) {
$biblioLoopIter{hostitemsflag} = 1;
$itemLoopIter->{hostbiblionumber} = $itemInfo->{biblionumber};
- $itemLoopIter->{hosttitle} = GetBiblioData( $itemInfo->{biblionumber} )->{title};
+ $itemLoopIter->{hosttitle} = Koha::Biblios->find( $itemInfo->{biblionumber} )->title;
}
# If there is no loan, return and transfer, we show a checkbox.
use C4::Biblio;
use C4::Scrubber;
use C4::Debug;
+
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::Review;
use Koha::Reviews;
# FIXME: need to allow user to delete their own comment(s)
my ( $clean, @errors, $savedreview );
-my $biblio = GetBiblioData($biblionumber);
+my $biblio = Koha::Biblios->find( $biblionumber );
if( !$biblio ) {
push @errors, { nobiblio => 1 };
'borrowernumber' => $borrowernumber,
'review' => $review,
'reviewid' => $reviewid || 0,
- 'title' => $biblio->{'title'},
+ 'title' => $biblio->title,
);
output_html_with_http_headers $query, $cookie, $template->output;
use C4::Languages qw(getLanguages);
use C4::Search;
use C4::Search::History;
-use C4::Biblio; # GetBiblioData
+use C4::Biblio; # Unused here?
use C4::Koha;
use C4::Tags qw(get_tags);
use C4::SocialData;
my $latest_comment_date;
for my $result (@$reviews){
my $biblionumber = $result->{biblionumber};
- my $bib = &GetBiblioData($biblionumber);
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ my $biblioitem = $biblio->biblioitem;
my $record = GetMarcBiblio($biblionumber);
my $frameworkcode = GetFrameworkCode($biblionumber);
my $borr = Koha::Patrons->find( $result->{borrowernumber} )->unblessed;
$result->{normalized_ean} = GetNormalizedEAN($record,$marcflavour);
$result->{normalized_oclc} = GetNormalizedOCLCNumber($record,$marcflavour);
$result->{normalized_isbn} = GetNormalizedISBN(undef,$record,$marcflavour);
- $result->{title} = $bib->{'title'};
+ $result->{title} = $biblio->title;
$result->{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
- $result->{author} = $bib->{'author'};
- $result->{place} = $bib->{'place'};
- $result->{publishercode} = $bib->{'publishercode'};
- $result->{copyrightdate} = $bib->{'copyrightdate'};
- $result->{pages} = $bib->{'pages'};
- $result->{size} = $bib->{'size'};
- $result->{notes} = $bib->{'notes'};
- $result->{timestamp} = $bib->{'timestamp'};
+ $result->{author} = $biblio->author;
+ $result->{place} = $biblioitem->place;
+ $result->{publishercode} = $biblioitem->publishercode;
+ $result->{copyrightdate} = $biblio->copyrightdate;
+ $result->{pages} = $biblioitem->pages;
+ $result->{size} = $biblioitem->size;
+ $result->{notes} = $biblioitem->notes;
+ $result->{timestamp} = $biblioitem->timestamp;
$result->{borrtitle} = $borr->{'title'};
$result->{firstname} = $borr->{'firstname'};
$result->{surname} = $borr->{'surname'};
use Data::Dumper;
+use Koha::Biblios;
+
my %newtags = ();
my @deltags = ();
my %counts = ();
$my_tags = get_tag_rows({borrowernumber=>$loggedinuser});
my $my_approved_tags = get_approval_rows({ approved => 1 });
foreach my $tag (@$my_tags) {
- my $biblio = GetBiblioData($tag->{biblionumber});
+ my $biblio = Koha::Biblios->find( $tag->{biblionumber} );
my $record = &GetMarcBiblio( $tag->{biblionumber} );
$tag->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $tag->{biblionumber} ) );
- $tag->{title} = $biblio->{title};
- $tag->{author} = $biblio->{author};
+ $tag->{title} = $biblio->title;
+ $tag->{author} = $biblio->author;
my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay');
my $lang = $xslfile ? C4::Languages::getlanguage() : undef;
use C4::Utils::DataTables::Members;
use C4::Members;
use C4::Search; # enabled_staff_search_views
+
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::Checkouts;
use Koha::Holds;
my %biblioloopiter = ();
- my $dat = GetBiblioData($biblionumber);
+ my $biblio = Koha::Biblios->find( $biblionumber );
my $force_hold_level;
if ( $patron ) {
$item->{holdingbranch} = $item->{holdingbranch};
}
- if($item->{biblionumber} ne $biblionumber){
- $item->{hostitemsflag}=1;
- $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
- }
-
+ if($item->{biblionumber} ne $biblionumber){
+ $item->{hostitemsflag} = 1;
+ $item->{hosttitle} = Koha::Biblios->find( $item->{biblionumber} )->title;
+ }
+
# if the item is currently on loan, we display its return date and
# change the background color
my $issue = Koha::Checkouts->find( { itemnumber => $itemnumber } );
date => $date,
biblionumber => $biblionumber,
findborrower => $findborrower,
- title => $dat->{title},
- author => $dat->{author},
+ title => $biblio->title,
+ author => $biblio->author,
holdsview => 1,
C4::Search::enabled_staff_search_views,
);
}
$biblioloopiter{biblionumber} = $biblionumber;
- $biblioloopiter{title} = $dat->{title};
+ $biblioloopiter{title} = $biblio->title;
$biblioloopiter{rank} = $fixedRank;
$biblioloopiter{reserveloop} = \@reserveloop;
use C4::Output;
use C4::Context;
use C4::Biblio;
+use Koha::Biblios;
use Koha::Patrons;
use Koha::Reviews;
foreach ( @$reviews ) {
my $borrowernumber = $_->{borrowernumber};
my $patron = Koha::Patrons->find( $borrowernumber);
- my $biblioData = GetBiblioData($_->{biblionumber});
+ my $biblio = Koha::Biblios->find( $_->{biblionumber} );
# setting some borrower info into this hash
- $_->{bibliotitle} = $biblioData->{'title'};
+ $_->{bibliotitle} = $biblio->title;
$_->{surname} = $patron->surname;
$_->{firstname} = $patron->firstname;
}
$processedserialid{$serialid} = 1;
}
}
-my $biblio = GetBiblioData( $serialdatalist[0]->{'biblionumber'} );
+my $biblio = Koha::Biblios->find( $serialdatalist[0]->{biblionumber} );
my @newserialloop;
my @subscriptionloop;
serialsadditems => $serialdatalist[0]->{'serialsadditems'},
callnumber => $serialdatalist[0]->{'callnumber'},
internalnotes => $serialdatalist[0]->{'internalnotes'},
- bibliotitle => $biblio->{'title'},
+ bibliotitle => $biblio->title,
biblionumber => $serialdatalist[0]->{'biblionumber'},
serialslist => \@serialdatalist,
default_bib_view => $default_bib_view,
use C4::Serials::Numberpattern;
use C4::Letters;
use Koha::AdditionalField;
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::ItemTypes;
use Carp;
my $new_biblionumber = $query->param('biblionumber_for_new_subscription');
if (defined $new_biblionumber) {
- my $bib = GetBiblioData($new_biblionumber);
- if (defined $bib) {
+ my $biblio = Koha::Biblios->find( $new_biblionumber );
+ if (defined $biblio) {
$template->param(bibnum => $new_biblionumber);
- $template->param(bibliotitle => $bib->{title});
+ $template->param(bibliotitle => $biblio->title);
}
}
# grab title, author, and ISBN to identify bib that the item
# belongs to in the display
- my $biblio=GetBiblioData($$itemdata{biblionumber});
- $this_row{title} = $biblio->{title};
- $this_row{author} = $biblio->{author};
- $this_row{isbn} = $biblio->{isbn};
- $this_row{biblionumber} = $biblio->{biblionumber};
+ my $biblio = Koha::Biblios->find( $itemdata->{biblionumber} );
+ $this_row{title} = $biblio->title;
+ $this_row{author} = $biblio->author;
+ $this_row{isbn} = $biblio->biblioitem->isbn;
+ $this_row{biblionumber} = $biblio->biblionumber;
if (%this_row) {
push(@big_array, \%this_row);
use C4::Circulation;
use C4::Reports::Guided; #_get_column_defs
use C4::Charset;
+
+use Koha::Biblios;
use Koha::DateUtils;
use Koha::AuthorisedValues;
use Koha::BiblioFrameworks;
? [ map { $results->{$_} } keys %$results ]
: $inventorylist // [];
for my $item ( @$loop ) {
- my $biblio = C4::Biblio::GetBiblioData($item->{biblionumber});
- $item->{title} = $biblio->{title};
- $item->{author} = $biblio->{author};
+ my $biblio = Koha::Biblios->find( $item->{biblionumber} );
+ $item->{title} = $biblio->title;
+ $item->{author} = $biblio->author;
}
$template->param(
use C4::Biblio;
use C4::ImportBatch;
+use Koha::Biblios;
+
# Input params
my $input = new CGI;
my $biblionumber = $input->param('id');
$recordBiblionumber = GetMarcBiblio($biblionumber, 'embed_items');
if( $recordBiblionumber ) {
$formatted1 = $recordBiblionumber->as_formatted;
- my $data = GetBiblioData($biblionumber);
- $biblioTitle = $data->{title};
+ my $biblio = Koha::Biblios->find( $biblionumber );
+ $biblioTitle = $biblio->title;
} else {
$errorFormatted1 = 1;
}
use C4::Output;
use C4::Auth;
+use Koha::Biblios;
use Koha::Virtualshelves;
my $query = new CGI;
my @biblios;
for my $biblionumber (@biblionumbers) {
- my $data = GetBiblioData($biblionumber);
+ my $biblio = Koha::Biblios->find( $biblionumber );
push(
@biblios,
{ biblionumber => $biblionumber,
- title => $data->{'title'},
- author => $data->{'author'},
+ title => $biblio->title,
+ author => $biblio->author,
}
);
}