fix long package locations showing up as line item on typeset invoices, RT#10093
[freeside.git] / FS / FS / cdr.pm
index 2406557..8f6a43c 100644 (file)
@@ -285,7 +285,7 @@ sub check {
 #  ;
 #  return $error if $error;
 
-  for my $f ( grep { $self->$_ =~ /[a-z ]/i } qw( startdate enddate ) ) {
+  for my $f ( grep { $self->$_ =~ /\D/ } qw(startdate answerdate enddate)){
     $self->$f( str2time($self->$f) );
   }
 
@@ -560,11 +560,7 @@ sub export_formats {
     elsif ( $opt{granularity} == 60 ) {#full minutes
       return sprintf("%.0fm",$sec/60);
     }
-    elsif ( $opt{granularity} == 6 || 
-            $opt{granularity} == 30 ) {#tenths or halves
-      return sprintf("%.01fm",$sec/60);
-    }
-    else { #seconds, or unspecified
+    else { #anything else
       return sprintf("%dm %ds", $sec/60, $sec%60);
     }
   };