X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fsepa.pl;h=18f48b2f5ed125e00065e50a80f34b30dc9f90fa;hb=c588d5b4c668465940282e57fc97d8d1c0ea94ce;hp=ce334b28a1d697b67338196f95a1dbfa47b69bda;hpb=5494f687372570c9d1c5eb5c6aad73767e50820a;p=kivitendo-erp.git diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index ce334b28a..18f48b2f5 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -40,6 +40,13 @@ sub bank_transfer_add { return; } + # Only include those per default that require manual action from our + # side. For sales invoices these are the ones for which direct debit + # has been selected. For purchase invoices it's the other way + # around: if direct debit is active then the vendor will collect + # from us automatically and we don't have to send money manually. + $_->{checked} = ($vc eq 'customer' ? $_->{direct_debit} : !$_->{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'); @@ -504,6 +511,7 @@ sub bank_transfer_download_sepa_xml { 'dst_iban' => $item->{vc_iban}, 'dst_bic' => $item->{vc_bic}, 'company' => $item->{vc_name}, + 'company_number' => $item->{vc_number}, 'amount' => $item->{amount}, 'reference' => $item->{reference}, 'reference_date' => $item->{reference_date},