$check_re->($invoice_recipient_data, 'address_row2', qr{^.{0,70}$});
$check_re->($invoice_recipient_data, 'countrycode', qr{^[A-Z]{2}$});
+ my %ref_nr_regexes = (
+ QRR => qr{^\d{27}$},
+ NON => qr{^$},
+ );
$check_re->($ref_nr_data, 'type', qr{^(?:QRR|SCOR|NON)$});
- $check_re->($ref_nr_data, 'ref_number', qr{^\d{27}$});
+ $check_re->($ref_nr_data, 'ref_number', $ref_nr_regexes{$ref_nr_data->{type}});
}
sub generate {
my $self = shift;
return Imager::QRCode->new(
- size => 3,
- margin => 1,
+ size => 4,
+ margin => 0,
level => 'M',
);
}
my $cross = Imager->new();
$cross->read(file => $Config{cross_file}) or die $cross->errstr, "\n";
- return $cross->scale(xpixels => 27, ypixels => 27, qtype => 'mixing');
+ return $cross->scale(xpixels => 35, ypixels => 35, qtype => 'mixing');
}
sub _plot {
=item C<ref_number>
-27 characters, numerical. QR-Reference.
+QR-Reference: 27 characters, numerical; without Reference: empty.
=back