[freeside-commits] freeside/FS/FS/part_export soma.pm,1.2,1.3
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Nov 24 07:18:45 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv24660
Modified Files:
soma.pm
Log Message:
be more accepting
Index: soma.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/soma.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- soma.pm 24 Nov 2008 14:48:28 -0000 1.2
+++ soma.pm 24 Nov 2008 15:18:42 -0000 1.3
@@ -381,7 +381,11 @@
my ( $self, $svc ) = @_;
my $svcdb = $svc->cust_svc->part_svc->svcdb;
- return sprintf( '%016X', $svc->title ) if $svcdb eq 'svc_external';
+ if ($svcdb eq 'svc_external') {
+ my $esn = $svc->title;
+ $esn =~ /^\s*(\d[a-fA-F])+\s*$/ && ($esn = $1);
+ return sprintf( '%016X', $esn ) if $svcdb eq 'svc_external';
+ }
my $cust_pkg = $svc->cust_svc->cust_pkg;
return '' unless $cust_pkg;
@@ -394,7 +398,10 @@
warn "part_export::soma found multiple ESNs for cust_svc ". $svc->svcnum
if scalar( @cust_svc ) > 1;
- sprintf( '%016X', $cust_svc[0]->svc_x->title );
+ my $esn = $cust_svc[0]->svc_x->title;
+ $esn =~ /^\s*(\d[a-fA-F])+\s*$/ && ($esn = $1);
+
+ sprintf( '%016X', $esn );
}
More information about the freeside-commits
mailing list