accounts w/time remaining search
[freeside.git] / FS / FS / svc_acct.pm
index 2e5da78..f5d3a22 100644 (file)
@@ -204,7 +204,7 @@ sub table_info {
   {
     'name'   => 'Account',
     'longname_plural' => 'Access accounts and mailboxes',
-    'sorts' => [ 'username', 'uid', ],
+    'sorts' => [ 'username', 'uid', 'seconds' ],
     'display_weight' => 10,
     'cancel_weight'  => 50, 
     'fields' => {
@@ -270,6 +270,7 @@ sub table_info {
                          disable_select => 1,
                        },
         'seconds'   => { label => 'Seconds',
+                         label_sort => 'with Time Remaining',
                          type  => 'text',
                          disable_inventory => 1,
                          disable_select => 1,
@@ -295,26 +296,26 @@ sub table_info {
                          'format' => \&FS::UI::bytecount::display_bytecount,
                          'parse' => \&FS::UI::bytecount::parse_bytecount,
                        },
-        'seconds_threshold'   => { label => 'Seconds',
+        'seconds_threshold'   => { label => 'Seconds threshold',
                                    type  => 'text',
                                    disable_inventory => 1,
                                    disable_select => 1,
                                  },
-        'upbytes_threshold'   => { label => 'Upload',
+        'upbytes_threshold'   => { label => 'Upload threshold',
                                    type  => 'text',
                                    disable_inventory => 1,
                                    disable_select => 1,
                                    'format' => \&FS::UI::bytecount::display_bytecount,
                                    'parse' => \&FS::UI::bytecount::parse_bytecount,
                                  },
-        'downbytes_threshold' => { label => 'Download',
+        'downbytes_threshold' => { label => 'Download threshold',
                                    type  => 'text',
                                    disable_inventory => 1,
                                    disable_select => 1,
                                    'format' => \&FS::UI::bytecount::display_bytecount,
                                    'parse' => \&FS::UI::bytecount::parse_bytecount,
                                  },
-        'totalbytes_threshold'=> { label => 'Total up and download',
+        'totalbytes_threshold'=> { label => 'Total up and download threshold',
                                    type  => 'text',
                                    disable_inventory => 1,
                                    disable_select => 1,
@@ -779,7 +780,7 @@ sub replace {
     }
   }
 
-  $error = $new->SUPER::replace($old);
+  $error = $new->SUPER::replace($old, @_);
   if ( $error ) {
     $dbh->rollback if $oldAutoCommit;
     return $error if $error;
@@ -845,7 +846,7 @@ Called by the suspend method of FS::cust_pkg (see L<FS::cust_pkg>).
 sub suspend {
   my $self = shift;
   return "can't suspend system account" if $self->_check_system;
-  $self->SUPER::suspend;
+  $self->SUPER::suspend(@_);
 }
 
 =item unsuspend
@@ -867,7 +868,7 @@ sub unsuspend {
     return $error if $error;
   }
 
-  $self->SUPER::unsuspend;
+  $self->SUPER::unsuspend(@_);
 }
 
 =item cancel
@@ -898,7 +899,7 @@ sub cancel {
     }
   }
 
-  $self->SUPER::cancel;
+  $self->SUPER::cancel(@_);
 }