summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2011-11-17 02:29:00 +0000
committerivan <ivan>2011-11-17 02:29:00 +0000
commitfc0f799f49e3b70f1c2253d556ab2cc7a95664fd (patch)
tree7db76acdf47e85f9c6109a4152bdafa355fb8c46 /FS/FS
parentbcce4879b66b40c9c0a370305f7dab4e48224866 (diff)
add inter.net numbering, RT#12981
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/cust_main.pm9
2 files changed, 13 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index e49174b..6eb539f 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3622,9 +3622,9 @@ and customer address. Include units.',
'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
'type' => 'select',
'select_hash' => [
- '' => 'Numeric only',
- '\d{7}' => 'Numeric only, exactly 7 digits',
- 'ww?d+' => 'Numeric with one or two letter prefix',
+ '' => 'Numeric only',
+ '\d{7}' => 'Numeric only, exactly 7 digits',
+ 'ww?d+' => 'Numeric with one or two letter prefix',
],
},
@@ -3779,6 +3779,7 @@ and customer address. Include units.',
'type' => 'select',
'select_hash' => [ '' => 'No',
'1YMMXXXXXXXX' => '1YMMXXXXXXXX',
+ '1001XXXXXXXX' => '1001XXXXXXXX',
],
},
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index f8e103e..32912af 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -676,6 +676,15 @@ sub auto_agent_custid {
$counter->unlock;
+ } elsif ( $format eq '1001XXXXXXXX' ) {
+
+ my $counter = new File::CounterFile 'cust_main.agent_custid';
+ $counter->lock;
+
+ $agent_custid = '1001'. $counter->inc;
+
+ $counter->unlock;
+
} else {
die "Unknown cust_main-auto_agent_custid format: $format";
}