[freeside-commits] freeside/FS/FS Conf.pm, 1.468.2.21, 1.468.2.22 cust_main.pm, 1.586.2.8, 1.586.2.9

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


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

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	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.468.2.21
retrieving revision 1.468.2.22
diff -u -w -d -r1.468.2.21 -r1.468.2.22
--- Conf.pm	21 Nov 2011 00:02:18 -0000	1.468.2.21
+++ Conf.pm	28 Nov 2011 01:40:27 -0000	1.468.2.22
@@ -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.586.2.8
retrieving revision 1.586.2.9
diff -u -w -d -r1.586.2.8 -r1.586.2.9
--- cust_main.pm	17 Nov 2011 02:29:05 -0000	1.586.2.8
+++ cust_main.pm	28 Nov 2011 01:40:27 -0000	1.586.2.9
@@ -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";
   }
@@ -3838,6 +3829,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