From: Moritz Bunkus Date: Fri, 5 Sep 2008 11:22:19 +0000 (+0000) Subject: Kosmetik; mehr Variablen umbenannt X-Git-Tag: release-2.6.0beta2~259 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4c5ca4c0d455af2d7f7809a6f02f2d15d86f04a6;p=kivitendo-erp.git Kosmetik; mehr Variablen umbenannt --- diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 055a7f076..da82d0336 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -324,8 +324,8 @@ sub _get_transactions { || $trans->[$j]->{'taxkey'} eq "1" || $trans->[$j]->{'taxkey'} eq "10" || $trans->[$j]->{'taxkey'} eq "11")) { - my %new_trans = {}; - map({ $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys(%{ $trans->[$notsplitindex] })); + my %new_trans = (); + map { $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys %{ $trans->[$notsplitindex] }; $absumsatz += $trans->[$j]->{'amount'}; $new_trans{'amount'} = $trans->[$j]->{'amount'} * (-1); @@ -338,13 +338,13 @@ sub _get_transactions { } elsif (($j != $notsplitindex) && ($trans->[$j]->{'chart_id'} eq "")) { $absumsatz += ($trans->[$j]->{'amount'} * (1 + $taxes{ $taxid_taxkeys{$trans->[$j]->{'taxkey'}} })); - my %new_trans = {}; - map({ $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys(%{ $trans->[$notsplitindex] })); + my %new_trans = (); + map { $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys %{ $trans->[$notsplitindex] }; - $test = 1 + $taxes{ $taxid_taxkeys{$trans->[$j]->{'taxkey'}} }; - $new_trans{'amount'} = $form->round_amount(($trans->[$j]->{'amount'} * $test * -1), 2); - $new_trans{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * $test), 2)) * $ml; - $trans->[$j]->{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * $test), 2)) * $ml; + my $tax_rate = 1 + $taxes{ $taxid_taxkeys{$trans->[$j]->{'taxkey'}} }; + $new_trans{'amount'} = $form->round_amount(($trans->[$j]->{'amount'} * $tax_rate * -1), 2); + $new_trans{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * $tax_rate), 2)) * $ml; + $trans->[$j]->{'umsatz'} = abs($form->round_amount(($trans->[$j]->{'amount'} * $tax_rate), 2)) * $ml; push @splits, [ \%new_trans, $trans->[$j] ]; push @{ $form->{DATEV} }, $splits[-1];