Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 71f33f59

Von Sven Schöling vor mehr als 13 Jahren hinzugefügt

Fehler bei Kreditorenbuchungen exklusive Steuern mit Fremdwährungen

Fix zu Bug 1547: Wurden Kreditorenbuchungen mit Steuern ohne Steuern im Preis
inbegriffen mit einer Fremdwährung gebucht, wurde die Steuer doppelt in die
Fremdwährung umgerechnet. Der Bug geht zurück auf die Splitbuchungen.

Btw.: Das korrektur Feld ist seit 5d44361c86fe35b3fb0485f2dbface7cf6d73b1d
nicht mehr benutzt, und wurde hier für AP gleich mit entfernt.

Unterschiede anzeigen:

SL/AP.pm
108 108

  
109 109
    my ($tax, $diff);
110 110
    if ($form->{taxincluded} *= 1) {
111
      if (!$form->{"korrektur_$i"}) {
112
        $tax =
113
          $form->{"amount_$i"} -
114
          ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
115
      } else {
116
        $tax = $form->{"tax_$i"};
117
      }
111
      $tax = $form->{"amount_$i"} - ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
118 112
      $amount = $form->{"amount_$i"} - $tax;
119 113
      $form->{"amount_$i"} = $form->round_amount($amount, 2);
120 114
      $diff += $amount - $form->{"amount_$i"};
121 115
      $form->{"tax_$i"} = $form->round_amount($tax, 2);
122 116
      $form->{netamount} += $form->{"amount_$i"};
123 117
    } else {
124
      if (!$form->{"korrektur_$i"}) {
125
        $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
126
      } else {
127
        $tax = $form->{"tax_$i"};
128
      }
129
      $form->{"tax_$i"} =
130
        $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
118
      $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
131 119
      $form->{netamount} += $form->{"amount_$i"};
132 120
    }
133 121
    $form->{total_tax} += $form->{"tax_$i"} * -1;

Auch abrufbar als: Unified diff