|
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. |