#
# 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 <http://www.gnu.org/licenses>.
use Modern::Perl;
-use CGI;
+use CGI qw ( -utf8 );
use JSON;
use C4::Auth;
use C4::Output;
use C4::Koha;
my $query = new CGI;
-my ( $template, $loggedinuser, $cookie, $flags ) =
- checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
+checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
"intranet" );
my $page = $query->param('page') || 0;
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