From b6d6ad18d758a2725f46a6706b709fbf92d8d0eb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 10 Jan 2013 13:28:08 +0100 Subject: [PATCH] =?utf8?q?SEPA-Einzug:=20Rechnungen=20mit=20gesetztem=20"L?= =?utf8?q?astschrifteinzug"=20vorausw=C3=A4hlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/SEPA.pm | 3 ++- bin/mozilla/sepa.pl | 2 ++ templates/webpages/sepa/bank_transfer_add.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/SEPA.pm b/SL/SEPA.pm index d2eb13fff..311b58e33 100644 --- a/SL/SEPA.pm +++ b/SL/SEPA.pm @@ -18,11 +18,12 @@ sub retrieve_open_invoices { my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); my $arap = $params{vc} eq 'customer' ? 'ar' : 'ap'; my $vc = $params{vc} eq 'customer' ? 'customer' : 'vendor'; + my $extra_columns = $arap eq 'ar' ? 'ar.direct_debit, ' : ''; my $query = qq| SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice, - vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, + vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${extra_columns} COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok, diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index ce334b28a..40d2dff79 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -40,6 +40,8 @@ sub bank_transfer_add { return; } + $_->{checked} = $_->{direct_debit} for @{ $invoices }; + my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) }; my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx'); diff --git a/templates/webpages/sepa/bank_transfer_add.html b/templates/webpages/sepa/bank_transfer_add.html index 58a7af6b9..575aeeaba 100644 --- a/templates/webpages/sepa/bank_transfer_add.html +++ b/templates/webpages/sepa/bank_transfer_add.html @@ -47,7 +47,7 @@ [%- IF invoice.vc_bank_info_ok %] - + [%- END %] -- 2.20.1