[freeside-commits] freeside/FS/FS cdr.pm, 1.48, 1.49 Conf.pm, 1.297, 1.298
Ivan,,,
ivan at wavetail.420.am
Wed Jul 15 15:49:35 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv11388
Modified Files:
cdr.pm Conf.pm
Log Message:
add option to trim leading zeros when setting charged_party to accountcode, RT#5495
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.297
retrieving revision 1.298
diff -u -d -r1.297 -r1.298
--- Conf.pm 8 Jul 2009 11:12:46 -0000 1.297
+++ Conf.pm 15 Jul 2009 22:49:33 -0000 1.298
@@ -2751,6 +2751,13 @@
'type' => 'checkbox',
},
+ {
+ 'key' => 'cdr-charged_party-accountcode-trim_leading_0s',
+ 'section' => '',
+ 'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros.',
+ 'type' => 'checkbox',
+ },
+
# {
# 'key' => 'cdr-charged_party-truncate_prefix',
# 'section' => '',
Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- cdr.pm 10 Jul 2009 00:36:02 -0000 1.48
+++ cdr.pm 15 Jul 2009 22:49:33 -0000 1.49
@@ -349,7 +349,10 @@
if ( $conf->exists('cdr-charged_party-accountcode') && $self->accountcode ){
- $self->charged_party( $self->accountcode );
+ my $charged_party = $self->accountcode;
+ $charged_party =~ s/^0+//
+ if $conf->exists('cdr-charged_party-accountcode-trim_leading_0s');
+ $self->charged_party( $charged_party );
} else {
More information about the freeside-commits
mailing list