disable_src fixes
authorivan <ivan>
Thu, 5 Jun 2008 19:44:27 +0000 (19:44 +0000)
committerivan <ivan>
Thu, 5 Jun 2008 19:44:27 +0000 (19:44 +0000)
FS/FS/cust_svc.pm
FS/FS/part_pkg/voip_cdr.pm

index b8b64df..381b97f 100644 (file)
@@ -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 ). ' ) ';
 
index 6a3a2ac..bd41cc6 100644 (file)
@@ -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".