X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fprospect_main.pm;h=1c47a80c2ab571ef109f1529fee6bc7e315e4888;hb=95563ec9360b73596318427a64ff07b84718dc9b;hp=47bac38e750a25d36c07c510b3e0023ece690c44;hpb=2db2d08f0196788b8ca4ae975b89c5acc001cde5;p=freeside.git diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index 47bac38e7..1c47a80c2 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -4,6 +4,7 @@ use strict; use base qw( FS::Quotable_Mixin FS::o2m_Common FS::Record ); use vars qw( $DEBUG @location_fields ); use Scalar::Util qw( blessed ); +use FS::Conf; use FS::Record qw( dbh qsearch qsearchs ); use FS::agent; use FS::cust_location; @@ -351,6 +352,9 @@ sub convert_cust_main { ( map { $_ => $self->$_ } qw( agentnum refnum company ) ), }; + $cust_main->refnum( FS::Conf->new->config('referraldefault') || 1 ) + unless $cust_main->refnum; + #XXX again, arbitrary, if one contact was "billing", that would be better if ( $contact[0] ) { $cust_main->set($_, $contact[0]->get($_)) foreach qw( first last );