From bfb68a07b1f2b1814c62fd963463fe65581f0a6f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 31 Jan 2013 12:16:53 +0100 Subject: [PATCH] Finanzcontrollingbericht: Projektnummern zur Projektbearbeitungsmaske verlinken --- SL/Controller/FinancialControllingReport.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm index 988d619e2..58df26b61 100644 --- a/SL/Controller/FinancialControllingReport.pm +++ b/SL/Controller/FinancialControllingReport.pm @@ -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; -- 2.20.1