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

(-)a/Koha/Item.pm (-9 / +2 lines)
Lines 1621-1635 Returns the items associated with this bundle Link Here
1621
sub bundle_items {
1621
sub bundle_items {
1622
    my ($self) = @_;
1622
    my ($self) = @_;
1623
1623
1624
    if ( !$self->{_bundle_items_cached} ) {
1624
    my $rs = $self->_result->bundle_items;
1625
        my $bundle_items = Koha::Items->search(
1625
    return Koha::Items->_new_from_dbic($rs);
1626
            { 'item_bundles_item.host' => $self->itemnumber },
1627
            { join                     => 'item_bundles_item' } );
1628
        $self->{_bundle_items}        = $bundle_items;
1629
        $self->{_bundle_items_cached} = 1;
1630
    }
1631
1632
    return $self->{_bundle_items};
1633
}
1626
}
1634
1627
1635
=head3 is_bundle
1628
=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