From 9c3eecdfd5610fce7da4d98935b6913ee6ab6b86 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 16 Dec 2016 09:56:45 +0100 Subject: [PATCH] BankTransaction: kein Push auf Skalarvariable Neue Perl-Versionen werfen bei Pushes auf Skalare (auch wenn das Arrayreferenzen sind) Fehler und nicht nur Warnungen: push $array_ref, $value; # Experimental push on scalar is now forbidden push @{ $array_ref }, $value; # OK --- SL/Controller/BankTransaction.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index fec37560e..ac9c3b123 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -131,7 +131,7 @@ sub action_list { $sepa_exports{$_->sepa_export_id}->{count}++ ; $sepa_exports{$_->sepa_export_id}->{is_ar}++ if $_->ar_id == $open_invoice->id; $sepa_exports{$_->sepa_export_id}->{amount} += $_->amount * $factor; - push ( @{ $sepa_exports{$_->sepa_export_id}->{invoices}} , $open_invoice ); + push @{ $sepa_exports{$_->sepa_export_id}->{invoices} }, $open_invoice; #$main::lxdebug->message(LXDebug->DEBUG2(),"amount for export id ".$_->sepa_export_id." = ". # $sepa_exports{$_->sepa_export_id}->{amount}." count = ". # $sepa_exports{$_->sepa_export_id}->{count}." is_ar = ". @@ -184,7 +184,7 @@ sub action_list { #$main::lxdebug->message(LXDebug->DEBUG2(),"remote account '".$bt->{remote_account_number}."' bt_amount=". ($bt->amount * $factor)); #$main::lxdebug->message(LXDebug->DEBUG2(),"compare with '".$_->vc_iban."' amount=".$_->amount); if ( $bt->{remote_account_number} eq $_->vc_iban && abs(( $_->amount *1 ) - ($bt->amount * $factor)) < 0.01 ) { - push ($bt->{proposals},$open_invoice ); + push @{ $bt->{proposals} }, $open_invoice; $bt->{agreement} = 20; $bt->{rule_matches} = 'sepa_export_item(20)'; #$main::lxdebug->message(LXDebug->DEBUG2(),"found invoice"); -- 2.20.1