Bugzilla – Attachment 141085 Details for
Bug 31649
Acquisition basket CSV export fails if biblio does not exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31649: Fix acquisition basket CSV export if biblio does not exist
Bug-31649-Fix-acquisition-basket-CSV-export-if-bib.patch (text/plain), 2.52 KB, created by
David Nind
on 2022-09-29 12:27:53 UTC
(
hide
)
Description:
Bug 31649: Fix acquisition basket CSV export if biblio does not exist
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-29 12:27:53 UTC
Size:
2.52 KB
patch
obsolete
>From a187b39ebfbe8d7446a3d5b3a44f8e850940e66f Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 28 Sep 2022 20:33:26 -1000 >Subject: [PATCH] Bug 31649: Fix acquisition basket CSV export if biblio does > not exist > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Acquisition.pm | 29 ++++++++++++++++------------- > 1 file changed, 16 insertions(+), 13 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index bbd01687a9..960902c85c 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -321,20 +321,23 @@ sub GetBasketAsCSV { > else { > foreach my $order (@orders) { > my $biblio = Koha::Biblios->find( $order->{biblionumber} ); >- my $biblioitem = $biblio->biblioitem; >+ my $biblioitem; >+ if ($biblio) { >+ $biblioitem = $biblio->biblioitem; >+ } > my $row = { >- contractname => $contract->{'contractname'}, >- ordernumber => $order->{'ordernumber'}, >- entrydate => $order->{'entrydate'}, >- isbn => $order->{'isbn'}, >- author => $biblio->author, >- title => $biblio->title, >- publicationyear => $biblioitem->publicationyear, >- publishercode => $biblioitem->publishercode, >- collectiontitle => $biblioitem->collectiontitle, >- notes => $order->{'order_vendornote'}, >- quantity => $order->{'quantity'}, >- rrp => $order->{'rrp'}, >+ contractname => $contract->{'contractname'}, >+ ordernumber => $order->{'ordernumber'}, >+ entrydate => $order->{'entrydate'}, >+ isbn => $order->{'isbn'}, >+ author => $biblio ? $biblio->author : q{}, >+ title => $biblio ? $biblio->title : q{}, >+ publicationyear => $biblioitem ? $biblioitem->publicationyear : q{}, >+ publishercode => $biblioitem ? $biblioitem->publishercode : q{}, >+ collectiontitle => $biblioitem ? $biblioitem->collectiontitle : q{}, >+ notes => $order->{'order_vendornote'}, >+ quantity => $order->{'quantity'}, >+ rrp => $order->{'rrp'}, > }; > for my $place ( qw( deliveryplace billingplace ) ) { > if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31649
:
141076
|
141077
|
141078
|
141084
|
141085
|
141086
|
141548
|
141549
|
141550