From: Moritz Bunkus Date: Thu, 7 Feb 2013 15:03:58 +0000 (+0100) Subject: SEPA-Überweisung: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen X-Git-Tag: release-3.1.0beta1~629 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d3961debf6970f827cd098b4b756caab81262b92;p=kivitendo-erp.git SEPA-Überweisung: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen --- diff --git a/SL/SEPA.pm b/SL/SEPA.pm index 311b58e33..e07fdcaf5 100644 --- a/SL/SEPA.pm +++ b/SL/SEPA.pm @@ -18,12 +18,11 @@ 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, ${extra_columns} + vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${arap}.direct_debit, COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok,