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

(-)a/Koha/Acquisition/Order.pm (-8 / +25 lines)
Lines 24-29 use Koha::Acquisition::Funds; Link Here
24
use Koha::Acquisition::Invoices;
24
use Koha::Acquisition::Invoices;
25
use Koha::Database;
25
use Koha::Database;
26
use Koha::DateUtils qw( dt_from_string output_pref );
26
use Koha::DateUtils qw( dt_from_string output_pref );
27
use Koha::Biblios;
27
use Koha::Items;
28
use Koha::Items;
28
use Koha::Patrons;
29
use Koha::Patrons;
29
use Koha::Subscriptions;
30
use Koha::Subscriptions;
Lines 202-207 sub items { Link Here
202
    return Koha::Items->search({ itemnumber => \@itemnumbers });
203
    return Koha::Items->search({ itemnumber => \@itemnumbers });
203
}
204
}
204
205
206
=head3 biblio
207
208
    my $biblio = $order->biblio
209
210
Returns the bibliographic record associated to the order
211
212
=cut
213
214
sub biblio {
215
    my ( $self ) = @_;
216
    my $biblio_rs= $self->_result->biblionumber;
217
    return Koha::Biblio->_new_from_dbic( $biblio_rs );
218
}
219
205
=head3 users
220
=head3 users
206
221
207
    my $patrons = $order->users
222
    my $patrons = $order->users
Lines 263-275 sub duplicate_to { Link Here
263
            $order_info->{basketno} = $basket->basketno;
278
            $order_info->{basketno} = $basket->basketno;
264
279
265
            $new_order = Koha::Acquisition::Order->new($order_info)->store;
280
            $new_order = Koha::Acquisition::Order->new($order_info)->store;
266
            my $items = $self->items;
281
267
            while ( my ($item) = $items->next ) {
282
            if ( not $self->biblio->serial || $self->basket->effective_create_items eq 'ordering') { # Do copy items if not a serial OR if items are created on ordering
268
                my $item_info = $item->unblessed;
283
                my $items = $self->items;
269
                undef $item_info->{itemnumber};
284
                while ( my ($item) = $items->next ) {
270
                undef $item_info->{barcode};
285
                    my $item_info = $item->unblessed;
271
                my $new_item = Koha::Item->new($item_info)->store;
286
                    undef $item_info->{itemnumber};
272
                $new_order->add_item( $new_item->itemnumber );
287
                    undef $item_info->{barcode};
288
                    my $new_item = Koha::Item->new($item_info)->store;
289
                    $new_order->add_item( $new_item->itemnumber );
290
                }
273
            }
291
            }
274
            my $users = $self->users; # Do we want ça?
292
            my $users = $self->users; # Do we want ça?
275
            while ( my ($user) = $users->next ) {
293
            while ( my ($user) = $users->next ) {
276
- 

Return to bug 15184