[freeside-commits] freeside/FS/FS Conf.pm, 1.489, 1.490 cust_main.pm, 1.595, 1.596

Ivan,,, ivan at wavetail.420.am
Sun Nov 27 17:40:19 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv19027/FS/FS

Modified Files:
	Conf.pm cust_main.pm 
Log Message:
add inter.net numbering on freeside custnum instead, RT#15326

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.489
retrieving revision 1.490
diff -u -w -d -r1.489 -r1.490
--- Conf.pm	21 Nov 2011 00:02:16 -0000	1.489
+++ Conf.pm	28 Nov 2011 01:40:16 -0000	1.490
@@ -3779,11 +3779,18 @@
     'type'        => 'select',
     'select_hash' => [ '' => 'No',
                        '1YMMXXXXXXXX' => '1YMMXXXXXXXX',
-                       '1001XXXXXXXX' => '1001XXXXXXXX',
                      ],
   },
 
   {
+    'key'         => 'cust_main-custnum-display_prefix',
+    'section'     => 'UI',
+    'description' => 'Prefix the customer number with this number for display purposes (and zero fill to 8 digits).',
+    'type'        => 'text',
+    #and then probably agent-virt this to merge these instances
+  },
+
+  {
     'key'         => 'cust_main-default_areacode',
     'section'     => 'UI',
     'description' => 'Default area code for customers.',

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.595
retrieving revision 1.596
diff -u -w -d -r1.595 -r1.596
--- cust_main.pm	17 Nov 2011 02:29:00 -0000	1.595
+++ cust_main.pm	28 Nov 2011 01:40:16 -0000	1.596
@@ -676,15 +676,6 @@
 
     $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";
   }
@@ -3888,6 +3879,9 @@
   my $self = shift;
   if ( $conf->exists('cust_main-default_agent_custid') && $self->agent_custid ){
     return $self->agent_custid;
+  } elsif ( $conf->config('cust_main-custnum-display_prefix') ) {
+    return $conf->config('cust_main-custnum-display_prefix').
+           sprintf('%08d', $self->custnum)
   } else {
     return $self->custnum;
   }



More information about the freeside-commits mailing list