projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7e9422a
)
Fix Contact selection on prospect, from Fernando-Kiernan, github#54
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 18 Aug 2016 21:01:58 +0000
(14:01 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 18 Aug 2016 21:01:58 +0000
(14:01 -0700)
FS/FS/prospect_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/prospect_main.pm
b/FS/FS/prospect_main.pm
index
9472996
..
67e91cf
100644
(file)
--- 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 $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;
}
'Prospect #'. $self->prospectnum;
}