From: Ivan Kohler Date: Thu, 18 Aug 2016 21:01:58 +0000 (-0700) Subject: Fix Contact selection on prospect, from Fernando-Kiernan, github#54 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e0b6fe25cca1e2ff566cc0765f6c9fa24ed66ba8 Fix Contact selection on prospect, from Fernando-Kiernan, github#54 --- diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index 947299693..67e91cf99 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -270,8 +270,11 @@ sub name { my $self = shift; return $self->company if $self->company; - my $contact = ($self->prospect_contact)[0]->contact; #first contact? good enough for now - return $contact->line if $contact; + my $prospect_contact = ($self->prospect_contact)[0]; #first contact? good enough for now + my $contact = $prospect_contact->contact if $prospect_contact; + return $contact->line if $prospect_contact && $contact; + + #address? 'Prospect #'. $self->prospectnum; }