From: Moritz Bunkus Date: Fri, 16 Dec 2016 08:56:45 +0000 (+0100) Subject: BankTransaction: kein Push auf Skalarvariable X-Git-Tag: release-3.5.4~1805 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9c3eecdfd5610fce7da4d98935b6913ee6ab6b86;p=kivitendo-erp.git 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 --- 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");