[freeside-commits] freeside/FS/FS cust_svc.pm,1.72,1.73
Ivan,,,
ivan at wavetail.420.am
Sat Mar 15 14:14:27 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv3887
Modified Files:
cust_svc.pm
Log Message:
configurable disable_src, domestic_prefix and international_prefix options for voip price plan
Index: cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_svc.pm,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- cust_svc.pm 12 Mar 2008 16:24:33 -0000 1.72
+++ cust_svc.pm 15 Mar 2008 21:14:25 -0000 1.73
@@ -642,6 +642,17 @@
sub get_cdrs_for_update {
my($self, %options) = @_;
+ my @cdrs = $self->get_cdrs_fromfield('charged_party', %options);
+
+ push @cdrs, $self->get_cdrs_fromfield('src', %options)
+ unless $options{'disable_src'};
+
+ @cdrs;
+}
+
+sub get_cdrs_fromfield {
+ my($self, $field, %options) = @_;
+
my $default_prefix = $options{'default_prefix'};
#CDRs are now associated with svc_phone services via svc_phone.phonenum
@@ -653,7 +664,7 @@
qsearch( {
'table' => 'cdr',
'hashref' => { 'freesidestatus' => '',
- 'charged_party' => $number
+ $field => $number
},
'extra_sql' => 'FOR UPDATE',
} );
@@ -663,33 +674,12 @@
qsearch( {
'table' => 'cdr',
'hashref' => { 'freesidestatus' => '',
- 'charged_party' => "$default_prefix$number",
+ $field => "$default_prefix$number",
},
'extra_sql' => 'FOR UPDATE',
} );
}
- #astricon hack? config option?
- push @cdrs,
- qsearch( {
- 'table' => 'cdr',
- 'hashref' => { 'freesidestatus' => '',
- 'src' => $number,
- },
- 'extra_sql' => 'FOR UPDATE',
- } );
-
- if ( length($default_prefix) ) {
- push @cdrs,
- qsearch( {
- 'table' => 'cdr',
- 'hashref' => { 'freesidestatus' => '',
- 'src' => "$default_prefix$number",
- },
- 'extra_sql' => 'FOR UPDATE',
- } );
- }
-
@cdrs;
}
More information about the freeside-commits
mailing list