From: Cem Aydin Date: Thu, 3 Feb 2022 20:43:32 +0000 (+0100) Subject: Swiss QR-Bill: Option Rechnung ohne Betrag X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~190 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=94976940f8eba1a83eef65bfd4ae09e65eea9030;p=kivitendo-erp.git Swiss QR-Bill: Option Rechnung ohne Betrag - Checkbox bei Rechnung hinzugefügt (eingeblendet wenn Feature aktiv, sonst hidden) - Integration in Odt Print Ablauf - Übersetzung + locales lauf --- diff --git a/SL/IS.pm b/SL/IS.pm index 11db135be..2ebf9aa26 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1481,7 +1481,7 @@ SQL cp_id = ?, marge_total = ?, marge_percent = ?, globalproject_id = ?, delivery_customer_id = ?, transaction_description = ?, delivery_vendor_id = ?, - donumber = ?, invnumber_for_credit_note = ?, direct_debit = ?, + donumber = ?, invnumber_for_credit_note = ?, direct_debit = ?, qrbill_without_amount = ?, delivery_term_id = ? WHERE id = ?|; @values = ( $form->{"invnumber"}, $form->{"ordnumber"}, $form->{"quonumber"}, $form->{"cusordnumber"}, @@ -1495,7 +1495,7 @@ SQL conv_i($form->{"cp_id"}), 1 * $form->{marge_total} , 1 * $form->{marge_percent}, conv_i($form->{"globalproject_id"}), conv_i($form->{"delivery_customer_id"}), $form->{transaction_description}, conv_i($form->{"delivery_vendor_id"}), - $form->{"donumber"}, $form->{"invnumber_for_credit_note"}, $form->{direct_debit} ? 't' : 'f', + $form->{"donumber"}, $form->{"invnumber_for_credit_note"}, $form->{direct_debit} ? 't' : 'f', $form->{qrbill_without_amount} ? 't' : 'f', conv_i($form->{delivery_term_id}), conv_i($form->{"id"})); do_query($form, $dbh, $query, @values); @@ -2249,7 +2249,7 @@ sub _retrieve_invoice { a.mtime, a.itime, a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type, a.transaction_description, a.donumber, a.invnumber_for_credit_note, - a.marge_total, a.marge_percent, a.direct_debit, a.delivery_term_id, + a.marge_total, a.marge_percent, a.direct_debit, a.qrbill_without_amount, a.delivery_term_id, dc.dunning_description, e.name AS employee FROM ar a diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index d8823b4ab..66d8f83ac 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -653,8 +653,15 @@ sub generate_qr_code { 'countrycode' => $biller_countrycode, ); + my $amount; + if ($form->{'qrbill_without_amount'}) { + $amount = ''; + } else { + $amount = sprintf("%.2f", $form->parse_amount(\%::myconfig, $form->{'total'})); + } + my %payment_information = ( - 'amount' => sprintf("%.2f", $form->parse_amount(\%::myconfig, $form->{'total'})), + 'amount' => $amount, 'currency' => $form->{'currency'}, ); diff --git a/locale/de/all b/locale/de/all index 42f9db400..7114e972e 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2753,6 +2753,7 @@ $self->{texts} = { 'Purpose' => 'Verwendungszweck', 'Purpose (if field names purpose, purpose1, purpose2 ... exist they will all combined into the field "purpose")' => 'Verwendungszweck (wenn die Spalten purpose, purpose1, purpose2 ... existieren werden diese zum Feld "purpose" zusammengefügt)', 'Purpose/Reference' => 'Verwendungszweck und Referenz', + 'QR bill without amount' => 'QR-Rechnung ohne Betrag', 'QR-Code placeholder image: QRCodePlaceholder not found in template.' => 'QR-Code Platzhalter Bild: QRCodePlaceholder nicht gefunden.', 'QR-Image generation failed: ' => 'QR-Code Erzeugung fehlgeschlagen: ', 'QUEUED' => 'In Warteschlange', diff --git a/templates/webpages/is/form_footer.html b/templates/webpages/is/form_footer.html index 856c7f488..7c749cf5a 100644 --- a/templates/webpages/is/form_footer.html +++ b/templates/webpages/is/form_footer.html @@ -40,6 +40,14 @@ [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %] +[%- IF INSTANCE_CONF.get_create_qrbill_invoices > 0 %] + + [% 'QR bill without amount' | $T8 %] + + [%- L.checkbox_tag('qrbill_without_amount', 'checked', qrbill_without_amount) %] + + +[%- END %] @@ -152,6 +160,10 @@ +[%- IF INSTANCE_CONF.get_create_qrbill_invoices <= 0 %] + +[%- END %] +