diff options
author | ivan <ivan> | 2011-03-13 19:45:37 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-13 19:45:37 +0000 |
commit | d20a6ac966a4236ed9115dd611739305e5879204 (patch) | |
tree | cd0424243507e2cb3357d59eec1000abb6a320e3 | |
parent | f0f1d277947922b81bcc4d77971a43ed125d72f5 (diff) |
qualification search improvements, RT#7111
-rw-r--r-- | FS/FS/prospect_main.pm | 9 | ||||
-rwxr-xr-x | httemplate/search/qual.cgi | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index bace1f040..78e865a7e 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -210,6 +210,15 @@ sub check { $self->SUPER::check; } +=item name + +=cut + +sub name { + my $self = shift; + $self->company; #at least until this is nullable +} + =item contact Returns the contacts (see L<FS::contact>) associated with this prospect. diff --git a/httemplate/search/qual.cgi b/httemplate/search/qual.cgi index cf4f3d111..1803ab827 100755 --- a/httemplate/search/qual.cgi +++ b/httemplate/search/qual.cgi @@ -21,19 +21,11 @@ my $self = shift; $self->status_long; }, - sub { - my $self = shift; - my $cust_or_prospect = $self->cust_or_prospect; - return $cust_or_prospect->name - if $cust_or_prospect->get('custnum'); - return "Prospect #".$cust_or_prospect->prospectnum - if $cust_or_prospect->get('prospectnum'); - ''; - }, + sub { shift->cust_or_prospect->name }, 'phonenum', sub { my $self = shift; - my %location_hash = $self->location; + my %location_hash= $self->location_hash; # ugh... if ( %location_hash ) { my $loc = new FS::cust_location(\%location_hash); |