From 96afb082588fae0b828307168aeffea98caa2539 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Oct 2018 17:18:18 -0300 Subject: [PATCH] Bug 21464: Fix overdue list export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e09ed656af5f75a82ccfa29318081e217618c32d Bug 18403: Only display libraries from group in dropdown lists and commit 0ab22e1c7c6b6e8d14a4fb7478ab2a3d42da347d Bug 18789: Send Koha::Patron object to the templates broke the overdue list export. Test plan: Create some overdues Export them: "Home › Circulation › Overdues" then click the link on top of the table. All the different columns of the generated CSV file must be filled correctly Signed-off-by: Martin Renvoize --- circ/overdue.pl | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index fe3fdd021f..8b88a24338 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -217,7 +217,7 @@ if ($noreport) { borrowers.surname, borrowers.firstname, borrowers.streetnumber, - borrowers.streettype, + borrowers.streettype, borrowers.address, borrowers.address2, borrowers.city, @@ -226,6 +226,8 @@ if ($noreport) { borrowers.phone, borrowers.email, borrowers.cardnumber, + borrowers.borrowernumber, + borrowers.branchcode, issues.itemnumber, issues.issuedate, items.barcode, @@ -233,9 +235,7 @@ if ($noreport) { items.holdingbranch, biblio.title, biblio.author, - borrowers.borrowernumber, biblio.biblionumber, - borrowers.branchcode, items.itemcallnumber, items.replacementprice, items.enumchron @@ -300,6 +300,21 @@ if ($noreport) { push @overduedata, { patron => scalar Koha::Patrons->find( $data->{borrowernumber} ), duedate => $data->{date_due}, + borrowernumber => $data->{borrowernumber}, + cardnumber => $data->{cardnumber}, + borrowertitle => $data->{borrowertitle}, + surname => $data->{surname}, + firstname => $data->{firstname}, + streetnumber => $data->{streetnumber}, + streettype => $data->{streettype}, + address => $data->{address}, + address2 => $data->{address2}, + city => $data->{city}, + zipcode => $data->{zipcode}, + country => $data->{country}, + phone => $data->{phone}, + email => $data->{email}, + branchcode => $data->{branchcode}, barcode => $data->{barcode}, itemnum => $data->{itemnumber}, issuedate => output_pref({ dt => dt_from_string( $data->{issuedate} ), dateonly => 1 }), @@ -364,7 +379,7 @@ sub build_csv { $csv->combine(@keys); push @lines, $csv->string(); - my @private_keys = qw( dueborrowertitle firstname surname phone email address address2 zipcode city country streetnumber streettype ); + my @private_keys = qw( title firstname surname phone email address address2 zipcode city country streetnumber streettype ); # ... and rest of report foreach my $overdue ( @{ $overdues } ) { unless ( $logged_in_user->can_see_patron_infos( $overdue->{patron} ) ) { -- 2.19.0