Letter: Anzeigesicherheit gegen nicht mehr existierende Kunden
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 27 Jan 2016 13:31:48 +0000 (14:31 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 27 Jan 2016 14:22:38 +0000 (15:22 +0100)
SL/Controller/Letter.pm

index 8e588d9..90fd26b 100644 (file)
@@ -354,7 +354,7 @@ sub prepare_report {
                                obj_link => sub { $self->url_for(action => 'edit', 'letter.id' => $_[0]->id, callback => $self->models->get_callback) }  },
     letternumber          => { text => t8('Letternumber'), sub => sub { $_[0]->letternumber },
                                obj_link => sub { $self->url_for(action => 'edit', 'letter.id' => $_[0]->id, callback => $self->models->get_callback) }  },
-    vc_id                 => { text => t8('Customer'),      sub => sub { $_[0]->customer->displayable_name } },
+    vc_id                 => { text => t8('Customer'),      sub => sub { SL::DB::Manager::Customer->find_by_or_create(id => $_[0]->vc_id)->displayable_name } },
     contact               => { text => t8('Contact'),       sub => sub { $_[0]->contact ? $_[0]->contact->full_name : '' } },
   );