From 8d534e61d74e561a15f0863a835cda4af639a9ea Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 21 Mar 2011 00:55:12 +0000 Subject: residential prospects, RT#7111 --- FS/FS/prospect_main.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'FS/FS/prospect_main.pm') diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index 78e865a..079ad25 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -203,7 +203,7 @@ sub check { my $error = $self->ut_numbern('prospectnum') || $self->ut_foreign_key('agentnum', 'agent', 'agentnum' ) - || $self->ut_text('company') + || $self->ut_textn('company') ; return $error if $error; @@ -216,7 +216,12 @@ sub check { sub name { my $self = shift; - $self->company; #at least until this is nullable + return $self->company if $self->company; + + my $contact = ($self->contact)[0]; #first contact? good enough for now + return $contact->line if $contact; + + $self->prospectnum; } =item contact -- cgit v1.1