X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8326cedca10878329ad4d5bf6405f977e14a541c..c11697d16352fc16dc0f70d7f555877d4936cd8c:/SL/Helper/QrBill.pm diff --git a/SL/Helper/QrBill.pm b/SL/Helper/QrBill.pm index 3628056bb..a83712430 100644 --- a/SL/Helper/QrBill.pm +++ b/SL/Helper/QrBill.pm @@ -93,8 +93,12 @@ sub _init_check { $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 { @@ -113,8 +117,8 @@ sub _qrcode { my $self = shift; return Imager::QRCode->new( - size => 3, - margin => 1, + size => 4, + margin => 0, level => 'M', ); } @@ -125,7 +129,7 @@ sub _cross { 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 { @@ -311,7 +315,7 @@ Maximum of 4 characters, alphanumerical. QRR/SCOR/NON. =item C -27 characters, numerical. QR-Reference. +QR-Reference: 27 characters, numerical; without Reference: empty. =back