X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fb-move-customers;h=e98ac62b835e6d6682dc6dc1d0a0014b5b46826d;hp=c17046bf28af2f66eacfd37191da701a4b5f8258;hb=51c0d6572357ba4d7c11a11e7ff506428c1cc045;hpb=d2b8818ae62696a1503faf12cb991c42e2d40e92 diff --git a/bin/b-move-customers b/bin/b-move-customers index c17046bf2..e98ac62b8 100755 --- a/bin/b-move-customers +++ b/bin/b-move-customers @@ -5,7 +5,7 @@ use strict; use vars qw( $sdbh ); -use DBI; +use FS::DBI; use FS::UID qw( adminsuidsetup dbh ); use FS::Schema qw( dbdef ); use FS::Record qw( qsearchs ); @@ -72,8 +72,8 @@ my $void_paynum = 2147483646; #top of int range # source(remote) setup -$sdbh = DBI->connect($source_datasrc, $source_user, $source_pw) - or die $DBI::errstr; +$sdbh = FS::DBI->connect($source_datasrc, $source_user, $source_pw) + or die $FS::DBI::errstr; $sdbh->{ChopBlanks} = 1; @@ -201,6 +201,9 @@ while ( my $customerrow = $customer_sth->fetchrow_hashref ) { import_table( 'cust_pkg', 'custnum' => $src_custnum, 'preinsert_callback' => sub { my($row, $object) = @_; + + $object->start_date(''); #bogus start dates on all packages + my $src_pkgpart = $row->{'pkgpart'} or die "wtf"; my $dest_pkgpart = $map{'part_pkg'}->{$src_pkgpart}; if ( $dest_pkgpart ) {