svc_acct events for usage limits, #13202
[freeside.git] / FS / FS / part_event / Condition / pkg_status.pm
index 3fb374e..0d99f3b 100644 (file)
@@ -13,6 +13,7 @@ sub eventtable_hashref {
     { 'cust_main' => 0,
       'cust_bill' => 0,
       'cust_pkg'  => 1,
+      'svc_acct'  => 1,
     };
 }
 
@@ -27,8 +28,9 @@ sub option_fields {
 }
 
 sub condition {
-  my( $self, $cust_pkg ) = @_;
+  my( $self, $object ) = @_;
 
+  my $cust_pkg = $self->cust_pkg($object);
   #XXX test
   my $hashref = $self->option('status') || {};
   $hashref->{ $cust_pkg->status };