From fced2ed0147049fded427862a3517c172f86513e Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 11 Mar 2011 00:45:53 +0000 Subject: [PATCH] prospect qualifications default to prospect address if there's one, other UI cleanups RT#7111 --- FS/FS/prospect_main.pm | 20 ++++++--- httemplate/elements/tr-select-cust_location.html | 47 +++++++++++++------- httemplate/elements/tr-td-label.html | 10 ++--- httemplate/misc/qual.html | 55 +++++++++++++++--------- 4 files changed, 85 insertions(+), 47 deletions(-) diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index 369029bab..bace1f040 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -41,14 +41,13 @@ from FS::Record. The following fields are currently supported: primary key -=item company - -company +=item agentnum -=item locationnum +Agent -locationnum +=item company +company =back @@ -222,6 +221,17 @@ sub contact { qsearch( 'contact', { 'prospectnum' => $self->prospectnum } ); } +=item cust_location + +Returns the locations (see L) associated with this prospect. + +=cut + +sub cust_location { + my $self = shift; + qsearch( 'cust_location', { 'prospectnum' => $self->prospectnum } ); +} + =item search HASHREF (Class method) diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html index 5802f4ec2..bb10a83de 100644 --- a/httemplate/elements/tr-select-cust_location.html +++ b/httemplate/elements/tr-select-cust_location.html @@ -160,14 +160,8 @@ Example: % if ( $opt{'is_optional'} ) {