quotations, RT#16996
[freeside.git] / FS / FS / prospect_main.pm
index 6adc852..b5d51d3 100644 (file)
@@ -1,10 +1,10 @@
 package FS::prospect_main;
 
 use strict;
-use base qw( FS::o2m_Common FS::Record );
+use base qw( FS::Quotable_Mixin FS::o2m_Common FS::Record );
 use vars qw( $DEBUG );
 use Scalar::Util qw( blessed );
-use FS::Record qw( dbh qsearch ); #qsearchs );
+use FS::Record qw( dbh qsearch qsearchs );
 use FS::agent;
 use FS::cust_location;
 use FS::contact;
@@ -213,6 +213,9 @@ sub check {
 
 =item name
 
+Returns a name for this prospect, as a string (company name for commercial
+prospects, contact name for residential prospects).
+
 =cut
 
 sub name {
@@ -259,6 +262,16 @@ sub qual {
   qsearch( 'qual', { 'prospectnum' => $self->prospectnum } );
 }
 
+=item agent
+
+Returns the agent (see L<FS::agent>) for this customer.
+
+=cut
+
+sub agent {
+  my $self = shift;
+  qsearchs( 'agent', { 'agentnum' => $self->agentnum } );
+}
 
 =item search HASHREF