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

(-)a/Koha/Item.pm (-9 / +2 lines)
Lines 1626-1640 Returns the items associated with this bundle Link Here
1626
sub bundle_items {
1626
sub bundle_items {
1627
    my ($self) = @_;
1627
    my ($self) = @_;
1628
1628
1629
    if ( !$self->{_bundle_items_cached} ) {
1629
    my $rs = $self->_result->bundle_items;
1630
        my $bundle_items = Koha::Items->search(
1630
    return Koha::Items->_new_from_dbic($rs);
1631
            { 'item_bundles_item.host' => $self->itemnumber },
1632
            { join                     => 'item_bundles_item' } );
1633
        $self->{_bundle_items}        = $bundle_items;
1634
        $self->{_bundle_items_cached} = 1;
1635
    }
1636
1637
    return $self->{_bundle_items};
1638
}
1631
}
1639
1632
1640
=head3 is_bundle
1633
=head3 is_bundle
(-)a/Koha/Schema/Result/Item.pm (-1 / +3 lines)
Lines 968-973 __PACKAGE__->many_to_many( Link Here
968
  "ordernumber",
968
  "ordernumber",
969
);
969
);
970
970
971
# Relationship with bundled items
972
__PACKAGE__->many_to_many( bundle_items => 'item_bundles_hosts', 'item' );
973
971
__PACKAGE__->might_have(
974
__PACKAGE__->might_have(
972
  "last_returned_by",
975
  "last_returned_by",
973
  "Koha::Schema::Result::ItemsLastBorrower",
976
  "Koha::Schema::Result::ItemsLastBorrower",
974
- 

Return to bug 32894