This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / FS / FS / part_pkg / voip_cdr.pm
index 38e5941..77b9af5 100644 (file)
@@ -309,10 +309,13 @@ sub calc_usage {
     grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc
   ) {
 
+    my $svc_phone = $cust_svc->svc_x;
     foreach my $cdr (
-      $cust_svc->get_cdrs_for_update(
+      $svc_phone->get_cdrs(
         'disable_src'    => $self->option('disable_src'),
         'default_prefix' => $self->option('default_prefix'),
+        'status'         => '',
+        'for_update'     => 1,
       )  # $last_bill, $$sdate )
     ) {
       if ( $DEBUG > 1 ) {
@@ -399,6 +402,8 @@ sub calc_usage {
 
           warn "rating call $to_or_from +$countrycode $number\n" if $DEBUG;
           $pretty_destnum = "+$countrycode $number";
+          #asterisks here causes inserting the detail to barf, so:
+          $pretty_destnum =~ s/\*//g;
 
           my $rate = qsearchs('rate', { 'ratenum' => $ratenum })
             or die "ratenum $ratenum not found!";