X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=offline_circ%2Fdownload.pl;h=ad120fd7661d7ece6f7278fd2090d4cf83ef881a;hb=3db7173dde0c8221c3628a0624c45f08d3f256fe;hp=95c2aeaefa812c4cc222fadc0fef56e2d4064ca5;hpb=9db23b8483b0437ada73a9bbc33a4b304ab08484;p=srvgit diff --git a/offline_circ/download.pl b/offline_circ/download.pl index 95c2aeaefa..ad120fd766 100755 --- a/offline_circ/download.pl +++ b/offline_circ/download.pl @@ -4,31 +4,29 @@ # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use Modern::Perl; -use CGI; -use JSON; -use C4::Auth; +use CGI qw ( -utf8 ); +use JSON qw( to_json ); +use C4::Auth qw( checkauth ); use C4::Output; use C4::Context; use C4::Koha; -my $query = new CGI; -my ( $template, $loggedinuser, $cookie, $flags ) = - checkauth( $query, undef, { circulate => "circulate_remaining_permissions" }, +my $query = CGI->new; +checkauth( $query, undef, { circulate => "circulate_remaining_permissions" }, "intranet" ); my $page = $query->param('page') || 0; @@ -38,8 +36,9 @@ my $req_data = $query->param('data') || ''; 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, + state, zipcode, country, email, phone, mobile, fax, dateofbirth, borrowers.branchcode, + 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 @@ -67,7 +66,8 @@ my $issues_query = q{SELECT items.itemcallnumber AS callnumber, issues.date_due AS date_due, issues.issuedate AS issuedate, - issues.renewals AS renewals, + issues.renewals_count AS renewals, + issues.unseen_renewals AS unseen_renewals, borrowers.cardnumber AS cardnumber, CONCAT(borrowers.surname, ', ', borrowers.firstname) AS borrower_name FROM issues