diff options
| author | ivan <ivan> | 2008-06-05 19:44:30 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-06-05 19:44:30 +0000 | 
| commit | 3b46683678d0ba43def449dec5f01e4907bbd349 (patch) | |
| tree | 4bf4ab4138ea35f8b753d9ae2b353de2417f33a6 | |
| parent | 292f15ceda4a9292532192b58069a32d68eced82 (diff) | |
disable_src fixes
| -rw-r--r-- | FS/FS/cust_svc.pm | 3 | ||||
| -rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 4 | 
2 files changed, 6 insertions, 1 deletions
| 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 62c3d5459..826bef88c 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -149,7 +149,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". | 
