Option to ignore old CDRs, RT#81480
authorIvan Kohler <ivan@freeside.biz>
Wed, 28 Nov 2018 21:41:36 +0000 (13:41 -0800)
committerIvan Kohler <ivan@freeside.biz>
Wed, 28 Nov 2018 21:41:36 +0000 (13:41 -0800)
FS/FS/part_pkg/voip_cdr.pm

index 1a05236..342f272 100644 (file)
@@ -686,9 +686,9 @@ sub check_chargable {
       and length($cdr->max_callers)
       and $cdr->max_callers <= $self->option_cacheable('skip_max_callers');
 
-  return "calldate < ". str2time($self->option_cacheable('skip_old'))
+  return "calldate < ". $self->option_cacheable('skip_old')
     if $self->option_cacheable('skip_old')
-    && $self->calldate_unix < str2time($self->option_cacheable('skip_old')); 
+    && $cdr->calldate_unix < str2time($self->option_cacheable('skip_old')); 
 
   #all right then, rate it
   '';