From: Moritz Bunkus Date: Thu, 10 Jan 2013 12:28:08 +0000 (+0100) Subject: SEPA-Einzug: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen X-Git-Tag: release-3.1.0beta1~753^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b6d6ad18d758a2725f46a6706b709fbf92d8d0eb;p=kivitendo-erp.git SEPA-Einzug: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen --- 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 %]