From: Martin Helmling martin.helmling@octosoft.eu Date: Wed, 10 Jan 2018 15:55:14 +0000 (+0100) Subject: SEPA-Sammelanweisung (is_batch_transaction): BUGFIX Loop richtig beenden X-Git-Tag: release-3.5.4~516 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/commitdiff_plain/44351ca4b1e92a63eb80e23dfb6a84ccc503ce9c SEPA-Sammelanweisung (is_batch_transaction): BUGFIX Loop richtig beenden Wurde eine Sammelanweisung gefunden, ist die Suche für die betroffenen Banktransaktion beendet. Fälschlicherweise wurde nur die innere Schleife beendet, es muss aber die äußere Schleife beendet werden. --- diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 692fb701b..fcea62217 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -153,6 +153,7 @@ sub action_list { $bt->{remote_name} .= $bt->{remote_name_1} if $bt->{remote_name_1}; if ( $bt->is_batch_transaction ) { + my $found=0; foreach ( keys %sepa_exports) { if ( abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) { ## jupp @@ -160,9 +161,11 @@ sub action_list { $bt->{sepa_export_ok} = 1; $sepa_exports{$_}->{proposed}=1; push(@proposals, $bt); - next; + $found=1; + last; } } + next if $found; # batch transaction has no remotename !! } else { next unless $bt->{remote_name}; # bank has no name, usually fees, use create invoice to assign