Skip to content

Commit

Permalink
Swiss QR-Bill: QrBill.pm: Füge Variante IBAN ohne Referenz hinzu
Browse files Browse the repository at this point in the history
  • Loading branch information
stsc authored and rebootl committed Jan 19, 2022
1 parent cf17820 commit 13aed1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SL/Helper/QrBill.pm
Expand Up @@ -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 {
Expand Down Expand Up @@ -311,7 +315,7 @@ Maximum of 4 characters, alphanumerical. QRR/SCOR/NON.
=item C<ref_number>
27 characters, numerical. QR-Reference.
QR-Reference: 27 characters, numerical; without Reference: empty.
=back
Expand Down

0 comments on commit 13aed1f

Please sign in to comment.