X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=offline_circ%2Fdownload.pl;h=713057c805ea651f6cfe05007597403b007c748b;hb=71f0370ddde0d8b8e2a666a091081186fb6531e8;hp=95c2aeaefa812c4cc222fadc0fef56e2d4064ca5;hpb=9db23b8483b0437ada73a9bbc33a4b304ab08484;p=koha.git diff --git a/offline_circ/download.pl b/offline_circ/download.pl index 95c2aeaefa..713057c805 100755 --- a/offline_circ/download.pl +++ b/offline_circ/download.pl @@ -19,7 +19,7 @@ # use Modern::Perl; -use CGI; +use CGI qw ( -utf8 ); use JSON; use C4::Auth; use C4::Output; @@ -39,7 +39,8 @@ my $patrons_query = q{SELECT borrowers.borrowernumber, cardnumber, surname, firstname, title, othernames, initials, streetnumber, streettype, address, address2, city, state, zipcode, country, email, phone, mobile, fax, dateofbirth, branchcode, - categorycode, dateenrolled, dateexpiry, gonenoaddress, lost, debarred, + categorycode, dateenrolled, dateexpiry, COALESCE(gonenoaddress, 0) AS gonenoaddress, + COALESCE(lost, 0) AS lost, debarred, debarredcomment, SUM(accountlines.amountoutstanding) AS fine FROM borrowers LEFT JOIN accountlines ON borrowers.borrowernumber=accountlines.borrowernumber