add inter.net numbering, RT#12981
authorivan <ivan>
Thu, 17 Nov 2011 02:29:05 +0000 (02:29 +0000)
committerivan <ivan>
Thu, 17 Nov 2011 02:29:05 +0000 (02:29 +0000)
FS/FS/Conf.pm
FS/FS/cust_main.pm

index e49174b..6eb539f 100644 (file)
@@ -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',
                      ],
   },
 
index 0bdc622..28f6e90 100644 (file)
@@ -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";
   }