Revision d3961deb
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/SEPA.pm | ||
---|---|---|
18 | 18 |
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); |
19 | 19 |
my $arap = $params{vc} eq 'customer' ? 'ar' : 'ap'; |
20 | 20 |
my $vc = $params{vc} eq 'customer' ? 'customer' : 'vendor'; |
21 |
my $extra_columns = $arap eq 'ar' ? 'ar.direct_debit, ' : ''; |
|
22 | 21 |
|
23 | 22 |
my $query = |
24 | 23 |
qq| |
25 | 24 |
SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice, |
26 |
vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${extra_columns}
|
|
25 |
vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${arap}.direct_debit,
|
|
27 | 26 |
|
28 | 27 |
COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok, |
29 | 28 |
|
Auch abrufbar als: Unified diff
SEPA-Überweisung: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen