Revision b6d6ad18
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, ' : ''; |
|
21 | 22 |
|
22 | 23 |
my $query = |
23 | 24 |
qq| |
24 | 25 |
SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice, |
25 |
vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, |
|
26 |
vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${extra_columns}
|
|
26 | 27 |
|
27 | 28 |
COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok, |
28 | 29 |
|
Auch abrufbar als: Unified diff
SEPA-Einzug: Rechnungen mit gesetztem "Lastschrifteinzug" vorauswählen