diff options
| author | ivan <ivan> | 2008-06-05 19:44:27 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-06-05 19:44:27 +0000 | 
| commit | 6161489c74f82e0765812a14615a7bc2ae3350cf (patch) | |
| tree | 5b3a2e85737deae42aa78a8fcb68226b1e635b04 | |
| parent | b340abd898f9f5285bfbb831f506742c79a89b55 (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 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". | 
