Finanzcontrollingbericht: Projektnummern zur Projektbearbeitungsmaske verlinken
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 31 Jan 2013 11:16:53 +0000 (12:16 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 17 Dec 2013 13:36:18 +0000 (14:36 +0100)
SL/Controller/FinancialControllingReport.pm

index 988d619..58df26b 100644 (file)
@@ -100,7 +100,8 @@ sub prepare_report {
     ordnumber               => { obj_link => sub { $self->link_to($_[0])                                              }  },
     customer                => {      sub => sub { $_[0]->customer->name                                              },
                                  obj_link => sub { $self->link_to($_[0]->customer)                                    }  },
-    globalprojectnumber     => {      sub => sub { $_[0]->globalproject_id ? $_[0]->globalproject->projectnumber : '' }  },
+    globalprojectnumber     => {      sub => sub { $_[0]->globalproject_id ? $_[0]->globalproject->projectnumber : '' },
+                                 obj_link => sub { $self->link_to($_[0]->globalproject)                               }  },
     globalproject_type      => { text     => $::locale->text('Project type'),
                                  sub      => sub { $_[0]->globalproject_id ? $_[0]->globalproject->project_type->description : '' }  },
   );
@@ -242,6 +243,10 @@ sub link_to {
     my $id     = $object->id;
     return "ct.pl?action=$action&id=$id&db=customer";
   }
+  if ($object->isa('SL::DB::Project')) {
+    my $id     = $object->id;
+    return "controller.pl?action=Project/$action&id=$id";
+  }
 }
 
 1;