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

(-)a/Koha/Acquisition/Basket.pm (+17 lines)
Lines 22-27 use Modern::Perl; Link Here
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils qw( dt_from_string );
23
use Koha::DateUtils qw( dt_from_string );
24
use Koha::Acquisition::BasketGroups;
24
use Koha::Acquisition::BasketGroups;
25
use Koha::Acquisition::Orders;
25
use Koha::Patrons;
26
use Koha::Patrons;
26
27
27
use base qw( Koha::Object Koha::Object::Mixin::AdditionalFields );
28
use base qw( Koha::Object Koha::Object::Mixin::AdditionalFields );
Lines 77-82 sub basket_group { Link Here
77
    return Koha::Acquisition::BasketGroup->_new_from_dbic( $basket_group_rs );
78
    return Koha::Acquisition::BasketGroup->_new_from_dbic( $basket_group_rs );
78
}
79
}
79
80
81
=head3 orders
82
83
    my $orders = $basket->orders;
84
85
Returns a Koha::Acquisition::Orders resultset, with the orders linked
86
to this basket.
87
88
=cut
89
90
sub orders {
91
    my ($self) = @_;
92
93
    my $orders_rs = $self->_result->orders;
94
    return Koha::Acquisition::Orders->_new_from_dbic( $orders_rs );
95
}
96
80
=head3 effective_create_items
97
=head3 effective_create_items
81
98
82
Returns C<create_items> for this basket, falling back to C<AcqCreateItem> if unset.
99
Returns C<create_items> for this basket, falling back to C<AcqCreateItem> if unset.
(-)a/Koha/Schema/Result/Aqbasket.pm (-1 / +7 lines)
Lines 340-345 __PACKAGE__->belongs_to( Link Here
340
  },
340
  },
341
);
341
);
342
342
343
__PACKAGE__->has_many(
344
  "orders",
345
  "Koha::Schema::Result::Aqorder",
346
  { "foreign.basketno" => "self.basketno" },
347
  { cascade_copy => 0, cascade_delete => 0 },
348
);
349
343
sub koha_object_class {
350
sub koha_object_class {
344
    'Koha::Acquisition::Basket';
351
    'Koha::Acquisition::Basket';
345
}
352
}
346
- 

Return to bug 26524