Revision 474247d8
Von Moritz Bunkus vor fast 15 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
482 | 482 |
$absumsatz += -1 * $new_trans{'amount'}; |
483 | 483 |
|
484 | 484 |
} else { |
485 |
my $unrounded = $trans->[$j]->{'amount'} * (1 + $tax_rate) * -1; # + $rounding_error;
|
|
485 |
my $unrounded = $trans->[$j]->{'amount'} * (1 + $tax_rate) * -1 + $rounding_error; |
|
486 | 486 |
my $rounded = $form->round_amount($unrounded, 2); |
487 |
$rounding_error += $unrounded - $rounded; |
|
487 |
|
|
488 |
$rounding_error = $unrounded - $rounded; |
|
488 | 489 |
$new_trans{'amount'} = $rounded; |
489 |
$new_trans{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * (1 + $tax_rate)), 2)) * $ml;
|
|
490 |
$trans->[$j]->{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * (1 + $tax_rate)), 2)) * $ml;
|
|
491 |
$absumsatz += $form->round_amount($trans->[$j]->{'amount'} + $trans->[$j]->{'amount'} * $tax_rate, 2);
|
|
490 |
$new_trans{'umsatz'} = abs($rounded) * $ml;
|
|
491 |
$trans->[$j]->{'umsatz'} = $new_trans{umsatz};
|
|
492 |
$absumsatz -= $rounded;
|
|
492 | 493 |
} |
493 | 494 |
|
494 | 495 |
push @{ $form->{DATEV} }, [ \%new_trans, $trans->[$j] ]; |
Auch abrufbar als: Unified diff
DATEV-Export: Rundungsfehler berücksichtigen & Codevereinfachung