X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fcust_main%2FImport.pm;h=e58a0447bb36541705879979bca77f51a38fef4b;hb=938615d6374c8e868647b88e3aa27c15e942b8ed;hp=901ff18ae429872d9a3841d6b3673170e7c6f7fb;hpb=2ab068f449eb97a10e18d20e9dab5ab9faa017e7;p=freeside.git diff --git a/FS/FS/cust_main/Import.pm b/FS/FS/cust_main/Import.pm index 901ff18ae..e58a0447b 100644 --- a/FS/FS/cust_main/Import.pm +++ b/FS/FS/cust_main/Import.pm @@ -214,6 +214,10 @@ sub batch_import { my $oldAutoCommit = $FS::UID::AutoCommit; local $FS::UID::AutoCommit = 0; my $dbh = dbh; + + #implies ignore_expired_card + local($FS::cust_main::import) = 1; + local($FS::cust_main::import) = 1; my $line; my $row = 0; @@ -328,6 +332,12 @@ sub batch_import { tie my %hash, 'Tie::RefHash'; #this part is important if ( $cust_pkg{'pkgpart'} ) { + + unless ( $cust_pkg{'pkgpart'} =~ /^\d+$/ ) { + $dbh->rollback if $oldAutoCommit; + return 'illegal pkgpart: '. $cust_pkg{'pkgpart'}; + } + my $cust_pkg = new FS::cust_pkg ( \%cust_pkg ); my @svc_x = ();