X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/034ba526051bdcb8ff4506abe0c860f66cd0e74f..639066d179464ead41625a9a901b165ce9a5eb06:/SL/Controller/BankTransaction.pm diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 7f896461b..fcea62217 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -25,7 +25,6 @@ use SL::DB::BankAccount; use SL::DB::RecordTemplate; use SL::DB::SepaExportItem; use SL::DBUtils qw(like); -use SL::Presenter; use List::MoreUtils qw(any); use List::Util qw(max); @@ -154,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 @@ -161,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