From: Moritz Bunkus Date: Thu, 31 Jan 2013 11:41:49 +0000 (+0100) Subject: Finanzcontrollingbericht: bezahlte Beträge als Netto und nicht Brutto berechnen X-Git-Tag: release-3.1.0beta1~22^2~75 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7a452195542fca0d82b74763fbc1eb97770d60a6;p=kivitendo-erp.git Finanzcontrollingbericht: bezahlte Beträge als Netto und nicht Brutto berechnen --- diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm index 2e62e0f7e..165a649c7 100644 --- a/SL/Controller/FinancialControllingReport.pm +++ b/SL/Controller/FinancialControllingReport.pm @@ -148,7 +148,7 @@ sub calculate_data { $order->{delivered_amount} = sum map { $self->sum_relevant_items(order => $order, other => $_, by_order => 1) } @delivery_orders; $order->{billed_amount} = sum map { $self->sum_relevant_items(order => $order, other => $_) } @invoices; - $order->{paid_amount} = sum map { $_->paid } @invoices; + $order->{paid_amount} = sum map { $_->paid * $_->netamount / (($_->amount * 1) || ($_->netamount * 1) || 1) } @invoices; my $billed_amount = sum map { $_->netamount } @invoices; $order->{other_amount} = $billed_amount - $order->{billed_amount}; $order->{billable_amount} = $order->{delivered_amount} - $order->{billed_amount};