From: Moritz Bunkus Date: Fri, 5 Sep 2008 10:10:27 +0000 (+0000) Subject: Kosmetik X-Git-Tag: release-2.6.0beta2~265 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bb49dee7e5651595e14d23e2aaa51190207e50e6;p=kivitendo-erp.git Kosmetik --- diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 28fc018e6..8d1601a9a 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -295,40 +295,38 @@ sub get_transactions { || $i->[$j]->{'taxkey'} eq "0" || $i->[$j]->{'taxkey'} eq "1" || $i->[$j]->{'taxkey'} eq "10" - || $i->[$j]->{'taxkey'} eq "11") - ) { + || $i->[$j]->{'taxkey'} eq "11")) { my %blubb = {}; - map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; } - keys(%{ $i->[$notsplitindex] })); - $absumsatz += $i->[$j]->{'amount'}; - $blubb{'amount'} = $i->[$j]->{'amount'} * (-1); - $blubb{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml; - $i->[$j]->{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml; + map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; } keys(%{ $i->[$notsplitindex] })); + + $absumsatz += $i->[$j]->{'amount'}; + $blubb{'amount'} = $i->[$j]->{'amount'} * (-1); + $blubb{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml; + $i->[$j]->{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml; + push @{ $splits[$g] }, \%blubb; #$i->[$notsplitindex]; push @{ $splits[$g] }, $i->[$j]; push @{ $form->{DATEV} }, \@{ $splits[$g] }; + $g++; - } elsif (($j != $notsplitindex) && ($i->[$j]->{'chart_id'} eq "")) { - $absumsatz += - ($i->[$j]->{'amount'} * (1 + $taxes{ $taxid_taxkeys{$i->[$j]->{'taxkey'}} })); - my %blubb = {}; - map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; } - keys(%{ $i->[$notsplitindex] })); - $test = 1 + $taxes{ $taxid_taxkeys{$i->[$j]->{'taxkey'}} }; - $blubb{'amount'} = - $form->round_amount(($i->[$j]->{'amount'} * $test * -1), 2); - $blubb{'umsatz'} = - abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml; + } elsif (($j != $notsplitindex) && ($i->[$j]->{'chart_id'} eq "")) { + $absumsatz += ($i->[$j]->{'amount'} * (1 + $taxes{ $taxid_taxkeys{$i->[$j]->{'taxkey'}} })); - $i->[$j]->{'umsatz'} = - abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml; + my %blubb = {}; + map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; } keys(%{ $i->[$notsplitindex] })); + + $test = 1 + $taxes{ $taxid_taxkeys{$i->[$j]->{'taxkey'}} }; + $blubb{'amount'} = $form->round_amount(($i->[$j]->{'amount'} * $test * -1), 2); + $blubb{'umsatz'} = abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml; + $i->[$j]->{'umsatz'} = abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml; push @{ $splits[$g] }, \%blubb; push @{ $splits[$g] }, $i->[$j]; push @{ $form->{DATEV} }, \@{ $splits[$g] }; $g++; - } else { + + } else { next; } }