Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9c3eecdf

Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt

  • ID 9c3eecdfd5610fce7da4d98935b6913ee6ab6b86
  • Vorgänger 728f5827
  • Nachfolger db468075

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

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
131 131
        $sepa_exports{$_->sepa_export_id}->{count}++ ;
132 132
        $sepa_exports{$_->sepa_export_id}->{is_ar}++ if  $_->ar_id == $open_invoice->id;
133 133
        $sepa_exports{$_->sepa_export_id}->{amount} += $_->amount * $factor;
134
        push ( @{ $sepa_exports{$_->sepa_export_id}->{invoices}} , $open_invoice );
134
        push @{ $sepa_exports{$_->sepa_export_id}->{invoices} }, $open_invoice;
135 135
        #$main::lxdebug->message(LXDebug->DEBUG2(),"amount for export id ".$_->sepa_export_id." = ".
136 136
        #                          $sepa_exports{$_->sepa_export_id}->{amount}." count = ".
137 137
        #                          $sepa_exports{$_->sepa_export_id}->{count}." is_ar = ".
......
184 184
          #$main::lxdebug->message(LXDebug->DEBUG2(),"remote account '".$bt->{remote_account_number}."' bt_amount=". ($bt->amount * $factor));
185 185
          #$main::lxdebug->message(LXDebug->DEBUG2(),"compare with   '".$_->vc_iban."'    amount=".$_->amount);
186 186
          if ( $bt->{remote_account_number} eq $_->vc_iban && abs(( $_->amount *1 ) - ($bt->amount * $factor)) < 0.01 ) {
187
            push ($bt->{proposals},$open_invoice );
187
            push @{ $bt->{proposals} }, $open_invoice;
188 188
            $bt->{agreement}    = 20;
189 189
            $bt->{rule_matches} = 'sepa_export_item(20)';
190 190
            #$main::lxdebug->message(LXDebug->DEBUG2(),"found invoice");

Auch abrufbar als: Unified diff