]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/FinancialControllingReport.pm
Finanzcontrollingbericht: Filterfelder breiter gemacht
[mfinanz.git] / SL / Controller / FinancialControllingReport.pm
index f0be9ada9dbf7b89e1f1b045f4f57b04ba5213ae..123be85737475451cfdebc9b89bcb4f4849b9386 100644 (file)
@@ -50,9 +50,9 @@ sub prepare_report {
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
-  my @columns     = qw(customer globalprojectnumber globalproject_type ordnumber net_amount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
+  my @columns     = qw(customer globalprojectnumber globalproject_type transaction_description ordnumber net_amount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
                        billable_amount billable_amount_p other_amount);
                        billable_amount billable_amount_p other_amount);
-  my @sortable    = qw(ordnumber transdate customer globalprojectnumber globalproject_type);
+  my @sortable    = qw(ordnumber transdate customer globalprojectnumber globalproject_type transaction_description );
   $self->{number_columns} = [ qw(net_amount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
 
   my %column_defs           = (
   $self->{number_columns} = [ qw(net_amount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
 
   my %column_defs           = (
@@ -66,6 +66,7 @@ sub prepare_report {
     billable_amount         => { text     => $::locale->text('Billable amount')                                          },
     billable_amount_p       => { text     => $::locale->text('%')                                                        },
     other_amount            => { text     => $::locale->text('Billed extra expenses')                                    },
     billable_amount         => { text     => $::locale->text('Billable amount')                                          },
     billable_amount_p       => { text     => $::locale->text('%')                                                        },
     other_amount            => { text     => $::locale->text('Billed extra expenses')                                    },
+    transaction_description => { text     => $::locale->text('Transaction description')                                  },
     ordnumber               => { obj_link => sub { $self->link_to($_[0])                                              }  },
     customer                => {      sub => sub { $_[0]->customer->name                                              },
                                  obj_link => sub { $self->link_to($_[0]->customer)                                    }  },
     ordnumber               => { obj_link => sub { $self->link_to($_[0])                                              }  },
     customer                => {      sub => sub { $_[0]->customer->name                                              },
                                  obj_link => sub { $self->link_to($_[0]->customer)                                    }  },
@@ -120,7 +121,7 @@ sub calculate_data {
     $order->{billable_amount}   = $order->{delivered_amount} - $order->{billed_amount};
 
     if ($order->periodic_invoices_config) {
     $order->{billable_amount}   = $order->{delivered_amount} - $order->{billed_amount};
 
     if ($order->periodic_invoices_config) {
-      my @dates = $order->periodic_invoices_config->calculate_invoice_dates(past_dates => 1, end_date => $order->periodic_invoices_config->end_date || DateTime->today_local);
+      my @dates = $order->periodic_invoices_config->calculate_invoice_dates(past_dates => 1, end_date => DateTime->today_local);
       $order->{net_amount} = $order->netamount * scalar(@dates);
 
     } else {
       $order->{net_amount} = $order->netamount * scalar(@dates);
 
     } else {
@@ -257,7 +258,7 @@ sub link_to {
   }
   if ($object->isa('SL::DB::Customer')) {
     my $id     = $object->id;
   }
   if ($object->isa('SL::DB::Customer')) {
     my $id     = $object->id;
-    return "ct.pl?action=$action&id=$id&db=customer";
+    return "controller.pl?action=CustomerVendor/$action&id=$id";
   }
   if ($object->isa('SL::DB::Project')) {
     my $id     = $object->id;
   }
   if ($object->isa('SL::DB::Project')) {
     my $id     = $object->id;