X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fmove-customers;h=f6f55613170a4193f9d72f95c1be0c450237d39d;hp=d237d12378c7ae9ff14db975ec8ab7ed8598987e;hb=793956b8a0c19d7d39103e94235b0ca13f0f3e84;hpb=55332cb444a9d80e168737e5132c458f1cc44450 diff --git a/bin/move-customers b/bin/move-customers index d237d1237..f6f556131 100755 --- a/bin/move-customers +++ b/bin/move-customers @@ -7,7 +7,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 ); @@ -19,6 +19,7 @@ use FS::cust_bill_ApplicationCommon; use FS::svc_Common; use FS::cust_event; use FS::svc_domain; +use FS::cust_pkg; my $DANGEROUS = 0; my $DRY = 0; @@ -85,6 +86,8 @@ $FS::svc_Common::noexport_hack = 1; $FS::svc_Common::noexport_hack = 1; $FS::svc_domain::whois_hack = 1; $FS::svc_domain::whois_hack = 1; +$FS::cust_pkg::disable_agentcheck = 1; +$FS::cust_pkg::disable_agentcheck = 1; my $void_paynum = 2147483646; #top of int range @@ -92,8 +95,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; @@ -127,7 +130,7 @@ while ( my $agentrow = $agent_sth->fetchrow_hashref ) { warn "importing customers for $src_agent\n"; - my $agent = qsearchs('agent', { 'agent' => $src_agent } ); + my $agent = qsearchs('agent', { 'agent' => $src_agent, 'disabled' => '' } ); if ( $agent ) {