X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FRP.pm;h=8ea8f4f7e28c52a06cab107a7e39348d68c05226;hb=f7b22ba3be03a171bb5ac64e1e408fcb3287caf1;hp=0b0000eacc4692ee0f0fd61922e2a5dfd852c733;hpb=4654d9931a51aaa867c425c1fc63618337df67e9;p=kivitendo-erp.git diff --git a/SL/RP.pm b/SL/RP.pm index 0b0000eac..8ea8f4f7e 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1645,7 +1645,7 @@ sub bwa { } my @periods = qw(jetzt kumm); - my @gesamtleistung = qw(1 2 3); + my @gesamtleistung = qw(1 3); my @gesamtkosten = qw (10 11 12 13 14 15 16 17 18 19 20); my @ergebnisse = qw (rohertrag betriebrohertrag betriebsergebnis neutraleraufwand neutralerertrag ergebnisvorsteuern ergebnis gesamtleistung gesamtkosten); @@ -1668,6 +1668,8 @@ sub bwa { foreach my $item (@gesamtleistung) { $form->{ "$key" . "gesamtleistung" } += $form->{$item}{$key}; } + $form->{ "$key" . "gesamtleistung" } -= $form->{2}{$key}; + foreach my $item (@gesamtkosten) { $form->{ "$key" . "gesamtkosten" } += $form->{$item}{$key}; } @@ -1920,28 +1922,20 @@ sub income_statement { $form->{decimalplaces} *= 1; - foreach my $item (@categories_einnahmen) { - $form->{$item} = 0; - } - foreach my $item (@categories_ausgaben) { - $form->{$item} = 0; - } - foreach my $item (@ergebnisse) { - $form->{$item} = 0; - } &get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate}, $form, "pos_eur"); + foreach my $item (@categories_einnahmen) { $form->{"eur${item}"} = - $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2)); + $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),2); $form->{"sumeura"} += $form->{$item}; } foreach my $item (@categories_ausgaben) { $form->{"eur${item}"} = - $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2)); + $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),2); $form->{"sumeurb"} += $form->{$item}; } @@ -1949,7 +1943,7 @@ sub income_statement { foreach my $item (@ergebnisse) { $form->{$item} = - $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2)); + $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),2); } $main::lxdebug->leave_sub(); }