Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9707dd46

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID 9707dd46f844046264b497664c6ba336f5703e9c
  • Vorgänger 381130c0
  • Nachfolger 1668bc2d

Nicht abgefangene uninitalisierte Variable.

Unterschiede anzeigen:

SL/AR.pm
40 40

  
41 41
use strict;
42 42

  
43
our (%myconfig, $form);
44

  
45 43
sub post_transaction {
46 44
  $main::lxdebug->enter_sub();
47 45

  
......
526 524

  
527 525
  my ($self, $form) = @_;
528 526

  
529
  my ($exchangerate, $key, $akey, $i, $j, $k, $index, $taxamount, $totaltax, $taxrate, $diff, $totalwithholding, $withholdingrate,
527
  my ($exchangerate, $akey, $j, $k, $index, $taxamount, $totaltax, $taxrate, $diff, $totalwithholding, $withholdingrate,
530 528
      $totalamount, $taxincluded, $tax);
531 529

  
532 530
  # forex
533 531
  $form->{forex} = $form->{exchangerate};
534 532
  $exchangerate  = $form->{exchangerate} ? $form->{exchangerate} : 1;
535 533

  
536
  foreach $key (keys %{ $form->{AR_links} }) {
534
  foreach my $key (keys %{ $form->{AR_links} }) {
537 535
    # if there is a value we have an old entry
538 536
    $j = 0;
539 537
    $k = 0;
540 538

  
541
    for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
539
    next unless $form->{acc_trans}{$key};
540

  
541
    for my $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
542 542
      if ($key eq "AR_paid") {
543 543
        $j++;
544 544
        $form->{"AR_paid_$j"} = $form->{acc_trans}{$key}->[$i-1]->{accno};
......
609 609
  if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {
610 610

  
611 611
    # add tax to amounts and invtotal
612
    for $i (1 .. $form->{rowcount}) {
612
    for my $i (1 .. $form->{rowcount}) {
613 613
      $taxamount            = ($totaltax + $totalwithholding) * $form->{"amount_$i"} / $totalamount;
614 614
      $tax                  = $form->round_amount($taxamount, 2);
615 615
      $diff                += ($taxamount - $tax);

Auch abrufbar als: Unified diff