@@ -, +, @@ patrons once if the same ID is inputted multiple times 23529000035676 23529000651225 23529000080862 23529000035676 19 49 7 49 2125551212 2125551212 2125551213 2125551214 - Upload the text file of cardnumbers. Notice one patron is displayed twice - Paste in the list of cardnumbers. Notice one patron is displayed twice - Upload the text file of SMS numbers. Notice one patron is displayed twice - Paste in the list of SMS numbers. Notice one patron is displayed twice - Upload the text file of borrower numbers. Notice one patron is displayed twice - Paste in the list of borrower numbers. Notice one patron is displayed twice --- tools/modborrowers.pl | 4 ++++ 1 file changed, 4 insertions(+) --- a/tools/modborrowers.pl +++ a/tools/modborrowers.pl @@ -37,6 +37,7 @@ use Koha::Libraries; use Koha::Patron::Categories; use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments ); use Koha::Patrons; +use List::MoreUtils qw(uniq); my $input = CGI->new; my $op = $input->param('op') || 'show_form'; @@ -110,6 +111,9 @@ if ( $op eq 'show' ) { my $max_nb_attr = 0; + # Make sure there is only one of each patron id number + @patronidnumbers = uniq( @patronidnumbers ); + for my $patronidnumber ( @patronidnumbers ) { my $patrons; if( $useborrowernumbers == 1 ){ --