projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
package fees and usage-based fees, #27687, #25899
[freeside.git]
/
FS
/
FS
/
Record.pm
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
ff8a0cc
..
a47cc8b
100644
(file)
--- 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 $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 );
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";
#my $table = $param->{table};
my $class = "FS::$table";