Finanzcontrolling: Aufträge mit wiedRech auf ganzes Jahr hochrechnen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 24 Sep 2014 07:54:01 +0000 (09:54 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 19 Feb 2015 09:20:44 +0000 (10:20 +0100)
SL/Controller/FinancialControllingReport.pm

index 50760a5..79bb8d0 100644 (file)
@@ -122,7 +122,7 @@ sub calculate_data {
 
     if ($order->periodic_invoices_config) {
       my @dates = $order->periodic_invoices_config->calculate_invoice_dates(past_dates => 1, end_date => DateTime->today_local);
-      $order->{net_amount} = $order->netamount * scalar(@dates);
+      $order->{net_amount} = $order->netamount * (12 / $order->periodic_invoices_config->get_period_length);
 
     } else {
       $order->{net_amount} = $order->netamount;