View | Details | Raw Unified | Return to bug 18255
Collapse All | Expand All

(-)a/C4/Biblio.pm (-24 lines)
Lines 67-73 BEGIN { Link Here
67
      GetMarcBiblio
67
      GetMarcBiblio
68
      GetBiblioItemData
68
      GetBiblioItemData
69
      GetBiblioItemInfosOf
69
      GetBiblioItemInfosOf
70
      GetBiblioItemByBiblioNumber
71
      GetBiblioFromItemNumber
70
      GetBiblioFromItemNumber
72
      GetBiblionumberFromItemnumber
71
      GetBiblionumberFromItemnumber
73
72
Lines 809-837 sub GetBiblioItemData { Link Here
809
    return ($data);
808
    return ($data);
810
}    # sub &GetBiblioItemData
809
}    # sub &GetBiblioItemData
811
810
812
=head2 GetBiblioItemByBiblioNumber
813
814
NOTE : This function has been copy/paste from C4/Biblio.pm from head before zebra integration.
815
816
=cut
817
818
sub GetBiblioItemByBiblioNumber {
819
    my ($biblionumber) = @_;
820
    my $dbh            = C4::Context->dbh;
821
    my $sth            = $dbh->prepare("Select * FROM biblioitems WHERE biblionumber = ?");
822
    my $count          = 0;
823
    my @results;
824
825
    $sth->execute($biblionumber);
826
827
    while ( my $data = $sth->fetchrow_hashref ) {
828
        push @results, $data;
829
    }
830
831
    $sth->finish;
832
    return @results;
833
}
834
835
=head2 GetBiblionumberFromItemnumber
811
=head2 GetBiblionumberFromItemnumber
836
812
837
813
(-)a/C4/ILSDI/Services.pm (-2 / +6 lines)
Lines 35-40 use DateTime; Link Here
35
use C4::Auth;
35
use C4::Auth;
36
use C4::Members::Attributes qw(GetBorrowerAttributes);
36
use C4::Members::Attributes qw(GetBorrowerAttributes);
37
37
38
use Koha::Biblioitems;
38
use Koha::Libraries;
39
use Koha::Libraries;
39
40
40
=head1 NAME
41
=head1 NAME
Lines 204-212 sub GetRecords { Link Here
204
    foreach my $biblionumber ( split( / /, $cgi->param('id') ) ) {
205
    foreach my $biblionumber ( split( / /, $cgi->param('id') ) ) {
205
206
206
        # Get the biblioitem from the biblionumber
207
        # Get the biblioitem from the biblionumber
207
        my $biblioitem = ( GetBiblioItemByBiblioNumber( $biblionumber, undef ) )[0];
208
        my $biblioitem =  Koha::Biblioitems->search( { biblionumber => $biblionumber } )->next;
208
        if ( not $biblioitem->{'biblionumber'} ) {
209
        if ( $biblioitem ) {
210
            $biblioitem = $biblioitem->unblessed;
211
        } else {
209
            $biblioitem->{code} = "RecordNotFound";
212
            $biblioitem->{code} = "RecordNotFound";
213
            # FIXME We should not need to process something else; next?
210
        }
214
        }
211
215
212
        my $embed_items = 1;
216
        my $embed_items = 1;
(-)a/C4/SIP/ILS/Transaction/Hold.pm (-2 / +2 lines)
Lines 10-16 use C4::SIP::ILS::Transaction; Link Here
10
10
11
use C4::Reserves;	# AddReserve
11
use C4::Reserves;	# AddReserve
12
use C4::Members;	# GetMember
12
use C4::Members;	# GetMember
13
use C4::Biblio;		# GetBiblioFromItemNumber GetBiblioItemByBiblioNumber
13
use C4::Biblio;		# GetBiblioFromItemNumber
14
use parent qw(C4::SIP::ILS::Transaction);
14
use parent qw(C4::SIP::ILS::Transaction);
15
15
16
16
Lines 62-68 sub do_hold { Link Here
62
        return $self;
62
        return $self;
63
    }
63
    }
64
    my $bibno = $bib->{biblionumber};
64
    my $bibno = $bib->{biblionumber};
65
    AddReserve( $branch, $borrower->{borrowernumber}, $bibno, GetBiblioItemByBiblioNumber($bibno) );
65
    AddReserve( $branch, $borrower->{borrowernumber}, $bibno );
66
66
67
    # unfortunately no meaningful return value
67
    # unfortunately no meaningful return value
68
    $self->ok(1);
68
    $self->ok(1);
(-)a/catalogue/itemsearch.pl (-1 / +1 lines)
Lines 213-219 if (scalar keys %params > 0) { Link Here
213
213
214
        foreach my $item (@$results) {
214
        foreach my $item (@$results) {
215
            $item->{biblio} = GetBiblio($item->{biblionumber});
215
            $item->{biblio} = GetBiblio($item->{biblionumber});
216
            ($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber});
216
            $item->{biblioitem} = Koha::Biblioitems->find( $item->{biblioitemnumber} )->unblessed;
217
            $item->{status} = $notforloan_map->{$item->{notforloan}};
217
            $item->{status} = $notforloan_map->{$item->{notforloan}};
218
            if (defined $item->{location}) {
218
            if (defined $item->{location}) {
219
                $item->{location} = $location_map->{$item->{location}};
219
                $item->{location} = $location_map->{$item->{location}};
(-)a/cataloguing/merge.pl (-3 lines)
Lines 158-165 if ($merge) { Link Here
158
158
159
    # Moving orders (orders linked to items of frombiblio have already been moved by MoveItemFromBiblio)
159
    # Moving orders (orders linked to items of frombiblio have already been moved by MoveItemFromBiblio)
160
    my @allorders = GetOrdersByBiblionumber($biblionumber);
160
    my @allorders = GetOrdersByBiblionumber($biblionumber);
161
    my @tobiblioitem = GetBiblioItemByBiblioNumber ($ref_biblionumber);
162
    my $tobiblioitem_biblioitemnumber = $tobiblioitem [0]-> {biblioitemnumber };
163
    foreach my $myorder (@allorders) {
161
    foreach my $myorder (@allorders) {
164
        $myorder->{'biblionumber'} = $ref_biblionumber;
162
        $myorder->{'biblionumber'} = $ref_biblionumber;
165
        ModOrder ($myorder);
163
        ModOrder ($myorder);
166
- 

Return to bug 18255