hide unused usage columns
[freeside.git] / FS / FS / part_pkg / flat.pm
index 3ac44c4..8fd0286 100644 (file)
@@ -195,12 +195,17 @@ sub is_prepaid {
   0; #no, we're postpaid
 }
 
+sub usage_valuehash {
+  my $self = shift;
+  map { $_, $self->option($_) } 
+    grep { $self->option($_, 'hush') } 
+    qw(seconds upbytes downbytes totalbytes);
+}
+
 sub reset_usage {
   my($self, $cust_pkg, %opt) = @_;
   warn "    resetting usage counters" if $opt{debug} > 1;
-  my %values = map { $_, $self->option($_) } 
-    grep { $self->option($_, 'hush') } 
-    qw(seconds upbytes downbytes totalbytes);
+  my %values = $self->usage_valuehash;
   if ($self->option('usage_rollover', 1)) {
     $cust_pkg->recharge(\%values);
   }else{