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

(-)a/Koha/Item.pm (-4 / +4 lines)
Lines 1172-1186 sub itemtype { Link Here
1172
    return Koha::ItemTypes->find( $self->effective_itemtype );
1172
    return Koha::ItemTypes->find( $self->effective_itemtype );
1173
}
1173
}
1174
1174
1175
=head3 item_orders
1175
=head3 orders
1176
1176
1177
my $orders = $item->item_orders();
1177
  my $orders = $item->orders();
1178
1178
1179
Returns a Koha::Acquisition::Orders object
1179
Returns a Koha::Acquisition::Orders object
1180
1180
1181
=cut
1181
=cut
1182
1182
1183
sub item_orders {
1183
sub orders {
1184
    my ( $self ) = @_;
1184
    my ( $self ) = @_;
1185
1185
1186
    my $orders = $self->_result->item_orders;
1186
    my $orders = $self->_result->item_orders;
Lines 1229-1235 sub move_to_biblio { Link Here
1229
    }
1229
    }
1230
1230
1231
    # Acquisition orders
1231
    # Acquisition orders
1232
    my $orders = $self->item_orders;
1232
    my $orders = $self->orders;
1233
    if ($orders) {
1233
    if ($orders) {
1234
        $orders->update({ biblionumber => $to_biblionumber }, { no_triggers => 1 });
1234
        $orders->update({ biblionumber => $to_biblionumber }, { no_triggers => 1 });
1235
    }
1235
    }
(-)a/t/db_dependent/Koha/Item.t (-2 / +1 lines)
Lines 856-862 subtest 'Tests for relationship between item and item_orders via aqorders_item' Link Here
856
        },
856
        },
857
    });
857
    });
858
858
859
    my $orders = $item->item_orders;
859
    my $orders = $item->orders;
860
    is ($orders->count, 1, 'One order found by item with the relationship');
860
    is ($orders->count, 1, 'One order found by item with the relationship');
861
    is ($orders->next->order_internalnote, $order_note, 'Correct order found by item with the relationship');
861
    is ($orders->next->order_internalnote, $order_note, 'Correct order found by item with the relationship');
862
};
862
};
863
- 

Return to bug 22690