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

(-)a/C4/Acquisition.pm (-14 / +16 lines)
Lines 321-340 sub GetBasketAsCSV { Link Here
321
    else {
321
    else {
322
        foreach my $order (@orders) {
322
        foreach my $order (@orders) {
323
            my $biblio = Koha::Biblios->find( $order->{biblionumber} );
323
            my $biblio = Koha::Biblios->find( $order->{biblionumber} );
324
            my $biblioitem = $biblio->biblioitem;
324
            my $biblioitem;
325
            if ($biblio) {
326
                $biblioitem = $biblio->biblioitem;
327
            }
325
            my $row = {
328
            my $row = {
326
                contractname => $contract->{'contractname'},
329
                contractname    => $contract->{'contractname'},
327
                ordernumber => $order->{'ordernumber'},
330
                ordernumber     => $order->{'ordernumber'},
328
                entrydate => $order->{'entrydate'},
331
                entrydate       => $order->{'entrydate'},
329
                isbn => $order->{'isbn'},
332
                isbn            => $order->{'isbn'},
330
                author => $biblio->author,
333
                author          => $biblio     ? $biblio->author              : q{},
331
                title => $biblio->title,
334
                title           => $biblio     ? $biblio->title               : q{},
332
                publicationyear => $biblioitem->publicationyear,
335
                publicationyear => $biblioitem ? $biblioitem->publicationyear : q{},
333
                publishercode => $biblioitem->publishercode,
336
                publishercode   => $biblioitem ? $biblioitem->publishercode   : q{},
334
                collectiontitle => $biblioitem->collectiontitle,
337
                collectiontitle => $biblioitem ? $biblioitem->collectiontitle : q{},
335
                notes => $order->{'order_vendornote'},
338
                notes           => $order->{'order_vendornote'},
336
                quantity => $order->{'quantity'},
339
                quantity        => $order->{'quantity'},
337
                rrp => $order->{'rrp'},
340
                rrp             => $order->{'rrp'},
338
            };
341
            };
339
            for my $place ( qw( deliveryplace billingplace ) ) {
342
            for my $place ( qw( deliveryplace billingplace ) ) {
340
                if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) {
343
                if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) {
341
- 

Return to bug 31649