From: Cem Aydin Date: Tue, 8 Feb 2022 14:41:25 +0000 (+0100) Subject: Swiss QR-Bill: Fix: Referenznummer nur bei gewählter Variante erzeugen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~193 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=11e8489d013880e256b666b4e8454e7cd744c750;p=kivitendo-erp.git Swiss QR-Bill: Fix: Referenznummer nur bei gewählter Variante erzeugen --- diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index 9f77d5700..d8823b4ab 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -670,20 +670,23 @@ sub generate_qr_code { 'countrycode' => $customer_countrycode, ); - # generate ref.-no. with check digit - my $ref_number = assemble_ref_number( - $qr_account->{'bank_account_id'}, - $form->{'customernumber'}, - $form->{'ordnumber'}, - $form->{'invnumber'}, - ); - my %ref_nr_data; if ($::instance_conf->get_create_qrbill_invoices == 1) { + # generate ref.-no. with check digit + my $ref_number = assemble_ref_number( + $qr_account->{'bank_account_id'}, + $form->{'customernumber'}, + $form->{'ordnumber'}, + $form->{'invnumber'}, + ); %ref_nr_data = ( 'type' => 'QRR', 'ref_number' => $ref_number, ); + # get ref. number/iban formatted with spaces and set into form for template + # processing + $form->{'ref_number'} = $ref_number; + $form->{'ref_number_formatted'} = get_ref_number_formatted($ref_number); } elsif ($::instance_conf->get_create_qrbill_invoices == 2) { %ref_nr_data = ( 'type' => 'NON', @@ -696,10 +699,6 @@ sub generate_qr_code { # set into form for template processing $form->{'biller_information'} = \%biller_information; $form->{'biller_data'} = \%biller_data; - $form->{'ref_number'} = $ref_number; - - # get ref. number/iban formatted with spaces - $form->{'ref_number_formatted'} = get_ref_number_formatted($ref_number); $form->{'iban_formatted'} = get_iban_formatted($qr_account->{'iban'}); # format amount for template