sub fixup_cardnumber {
my ( $self ) = @_;
my ( $max ) = Koha::Plugins->call( 'barcode_generate', 'patron', $self );
my ( $max ) = Koha::Plugins->call( 'patron_barcode_transform', $self ) || undef;
$max ||= Koha::Patrons->search({
cardnumber => {-regexp => '^-?[0-9]+$'}
-