diff options
author | ivan <ivan> | 2011-03-21 00:55:12 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-21 00:55:12 +0000 |
commit | 8d534e61d74e561a15f0863a835cda4af639a9ea (patch) | |
tree | ca0f3939c9e663a41d7ca64d1e3d95411aa68057 /FS/FS/prospect_main.pm | |
parent | 88fdb01339ae2b598b29c8033f31a50d46e44cad (diff) |
residential prospects, RT#7111
Diffstat (limited to 'FS/FS/prospect_main.pm')
-rw-r--r-- | FS/FS/prospect_main.pm | 9 |
1 files changed, 7 insertions, 2 deletions
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 |