From d3961debf6970f827cd098b4b756caab81262b92 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 7 Feb 2013 16:03:58 +0100 Subject: [PATCH] =?utf8?q?SEPA-=C3=9Cberweisung:=20Rechnungen=20mit=20gese?= =?utf8?q?tztem=20"Lastschrifteinzug"=20vorausw=C3=A4hlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/SEPA.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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, -- 2.20.1