set svcnum when rating CDR, RT#5495
authorivan <ivan>
Tue, 15 Sep 2009 23:13:34 +0000 (23:13 +0000)
committerivan <ivan>
Tue, 15 Sep 2009 23:13:34 +0000 (23:13 +0000)
FS/FS/cdr.pm
FS/FS/part_pkg/voip_cdr.pm

index c5b2ab9..d9c602f 100644 (file)
@@ -375,7 +375,7 @@ sub set_charged_party {
 
 }
 
 
 }
 
-=item set_status_and_rated_price STATUS [ RATED_PRICE ]
+=item set_status_and_rated_price STATUS [ RATED_PRICE [ SVCNUM ] ]
 
 Sets the status to the provided string.  If there is an error, returns the
 error, otherwise returns false.
 
 Sets the status to the provided string.  If there is an error, returns the
 error, otherwise returns false.
@@ -383,9 +383,10 @@ error, otherwise returns false.
 =cut
 
 sub set_status_and_rated_price {
 =cut
 
 sub set_status_and_rated_price {
-  my($self, $status, $rated_price) = @_;
+  my($self, $status, $rated_price, $svcnum) = @_;
   $self->freesidestatus($status);
   $self->rated_price($rated_price);
   $self->freesidestatus($status);
   $self->rated_price($rated_price);
+  $self->svcnum($svcnum) if $svcnum;
   $self->replace();
 }
 
   $self->replace();
 }
 
index ee00914..f851b41 100644 (file)
@@ -591,7 +591,10 @@ sub calc_usage {
         #$downstream_cdr .= $cdr->downstream_csv( 'format' => 'XXX format' )
         #  if $spool_cdr;
 
         #$downstream_cdr .= $cdr->downstream_csv( 'format' => 'XXX format' )
         #  if $spool_cdr;
 
-        my $error = $cdr->set_status_and_rated_price('done', $charge);
+        my $error = $cdr->set_status_and_rated_price( 'done',
+                                                      $charge,
+                                                      $cust_svc->svcnum,
+                                                    );
         die $error if $error;
 
       }
         die $error if $error;
 
       }