[freeside-commits] branch FREESIDE_3_BRANCH updated. c776d3d0b3ebcdddcb42ed3476e4047fd9c90a9b

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


The branch, FREESIDE_3_BRANCH has been updated
       via  c776d3d0b3ebcdddcb42ed3476e4047fd9c90a9b (commit)
      from  e4a3eb292893c0efc15d2ee591fa2a05c31dbeff (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 c776d3d0b3ebcdddcb42ed3476e4047fd9c90a9b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 8 09:00:44 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 47bac38..1c47a80 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 );

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

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




More information about the freeside-commits mailing list