Bug 29788: Make Koha::Item->safe_to_delete use Koha::Result::Boolean
[koha-ffzg.git] / misc / export_records.pl
index 9a2bc6b..32658cb 100755 (executable)
@@ -18,9 +18,9 @@
 
 use Modern::Perl;
 use MARC::File::XML;
-use List::MoreUtils qw(uniq);
-use Getopt::Long;
-use Pod::Usage;
+use List::MoreUtils qw( uniq );
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use C4::Auth;
@@ -242,6 +242,7 @@ if ($deleted_barcodes) {
             SELECT DISTINCT barcode
             FROM deleteditems
             WHERE deleteditems.biblionumber = ?
+            AND barcode IS NOT NULL AND barcode != ''
         |, { Slice => {} }, $record_id );
         say $_->{barcode} for @$barcode;
     }
@@ -398,11 +399,17 @@ Copyright Koha Team
 
 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.
-
-You should have received a copy of the GNU General Public License along
-with Koha; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# 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, see <http://www.gnu.org/licenses>.
 
 =cut