From: ivan Date: Thu, 5 Jun 2008 19:44:27 +0000 (+0000) Subject: disable_src fixes X-Git-Tag: root_of_webpay_support~582 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=6161489c74f82e0765812a14615a7bc2ae3350cf disable_src fixes --- diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index b8b64df6b..381b97f14 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -655,6 +655,9 @@ sub get_cdrs_for_update { my @where = map " $_ = '$number' ", @fields; push @where, map " $_ = '$prefix$number' ", @fields if length($prefix); + if ( $prefix =~ /^\+(\d+)$/ ) { + push @where, map " $_ = '$1$number' ", @fields + } my $extra_sql = ' AND ( '. join(' OR ', @where ). ' ) '; diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 6a3a2acc2..bd41cc64e 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -150,7 +150,9 @@ sub calc_recur { ) { foreach my $cdr ( - $cust_svc->get_cdrs_for_update() # $last_bill, $$sdate ) + $cust_svc->get_cdrs_for_update( 'disable_src' => $self->option('disable_src'), + 'default_prefix' => $self->option('default_prefix'), + ) # $last_bill, $$sdate ) ) { if ( $DEBUG > 1 ) { warn "rating CDR $cdr\n".