X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=a47cc8bc19c6600460e297bf1cbf251e90e9d14a;hb=a0e00fa0547e99893c735ab3dbdacdb2bb054f5a;hp=ff8a0cc2791282c800320dce0d7b9ac7a77597ee;hpb=8d6ea7d8fddec3fd471a0e68f297d20e191c6f11;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index ff8a0cc27..a47cc8bc1 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1847,6 +1847,9 @@ sub batch_import { my $file = $param->{file}; my $params = $param->{params} || {}; + my $custnum_prefix = $conf->config('cust_main-custnum-display_prefix'); + my $custnum_length = $conf->config('cust_main-custnum-display_length') || 8; + my( $type, $header, $sep_char, $fixedlength_format, $xml_format, $asn_format, $parser_opt, $row_callback, @fields ); @@ -2131,6 +2134,11 @@ sub batch_import { } + if ( $custnum_prefix && $hash{custnum} =~ /^$custnum_prefix(0*([1-9]\d*))$/ + && length($1) == $custnum_length ) { + $hash{custnum} = $2; + } + #my $table = $param->{table}; my $class = "FS::$table";