use C4::Debug;
BEGIN {
- use version; our $VERSION = qv('1.0.0_1');
+ use version; our $VERSION = qv('3.07.00.049');
}
sub _check_params {
};
while (my $record = $sth->fetchrow_hashref) {
$self->{'branch_code'} = $record->{'branch_code'};
+ $self->{'creator'} = $record->{'creator'};
push (@{$self->{'items'}}, {$number_type => $record->{$number_type}, label_id => $record->{'label_id'}});
$record_flag = 1; # true if one or more rows were retrieved
}
my %seen=();
my $query = "DELETE FROM creator_batches WHERE label_id = ?;"; # ORDER BY timestamp ASC LIMIT ?;";
my $sth = C4::Context->dbh->prepare($query);
- my @duplicate_items = grep{$seen{$_->{'item_number'}}++} @{$self->{'items'}};
+ my @duplicate_items = grep{
+ $_->{'item_number'}
+ ? $seen{$_->{'item_number'}}++
+ : $seen{$_->{'borrower_number'}}++
+ } @{$self->{'items'}};
foreach my $item (@duplicate_items) {
$sth->execute($item->{'label_id'});
if ($sth->err) {
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 2 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., 59 Temple Place,
-Suite 330, Boston, MA 02111-1307 USA
+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.
=head1 DISCLAIMER OF WARRANTY