projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
planet telecom rate import, RT#83146
[freeside.git]
/
bin
/
b-move-customers
diff --git
a/bin/b-move-customers
b/bin/b-move-customers
index
411846f
..
e98ac62
100755
(executable)
--- a/
bin/b-move-customers
+++ b/
bin/b-move-customers
@@
-5,7
+5,7
@@
use strict;
use vars qw( $sdbh );
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 );
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
# 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;
$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) = @_;
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 ) {
my $src_pkgpart = $row->{'pkgpart'} or die "wtf";
my $dest_pkgpart = $map{'part_pkg'}->{$src_pkgpart};
if ( $dest_pkgpart ) {
@@
-256,9
+259,6
@@
while ( my $customerrow = $customer_sth->fetchrow_hashref ) {
'preinsert_callback' => sub {
my($row, $object) = @_;
'preinsert_callback' => sub {
my($row, $object) = @_;
-
- $object->start_date(''); #bogus start dates on all packages
-
my $src_svcpart = $row->{'svcpart'} or die "wtf2";
my $dest_svcpart = $map{'part_svc'}->{$src_svcpart};
if ( $dest_svcpart ) {
my $src_svcpart = $row->{'svcpart'} or die "wtf2";
my $dest_svcpart = $map{'part_svc'}->{$src_svcpart};
if ( $dest_svcpart ) {