[freeside-commits] branch master updated. 99e332001fc0a3483bc999d51f5e01ed2efec5f6

Ivan ivan at 420.am
Thu Jan 8 09:00:41 PST 2015


The branch, master has been updated
       via  99e332001fc0a3483bc999d51f5e01ed2efec5f6 (commit)
      from  bd070d61afd640efdc7e659945badb04d99658a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 99e332001fc0a3483bc999d51f5e01ed2efec5f6
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 8 09:00:37 2015 -0800

    fix v3 prospect->customer conversion, RT#31965, RT#31202

diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm
index 7ae15cd..79b3f67 100644
--- a/FS/FS/prospect_main.pm
+++ b/FS/FS/prospect_main.pm
@@ -4,6 +4,7 @@ use base qw( FS::Quotable_Mixin FS::o2m_Common FS::Record );
 use strict;
 use vars qw( $DEBUG @location_fields );
 use Scalar::Util qw( blessed );
+use FS::Conf;
 use FS::Record qw( dbh qsearch ); # qsearchs );
 use FS::cust_location;
 use FS::cust_main;
@@ -327,6 +328,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 );

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/prospect_main.pm |    4 ++++
 1 file changed, 4 insertions(+)




More information about the freeside-commits mailing list