X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition%2Fpkg_status.pm;h=0d99f3bbc1a23f6fb90b9e59a5d1cb7dafd4760b;hb=2748aaf4aa3f19e17a37edc07e89ee402108900d;hp=6c1c9cca5240d01ff70578a72c0897388c15dfc4;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/FS/FS/part_event/Condition/pkg_status.pm b/FS/FS/part_event/Condition/pkg_status.pm index 6c1c9cca5..0d99f3bbc 100644 --- a/FS/FS/part_event/Condition/pkg_status.pm +++ b/FS/FS/part_event/Condition/pkg_status.pm @@ -13,6 +13,7 @@ sub eventtable_hashref { { 'cust_main' => 0, 'cust_bill' => 0, 'cust_pkg' => 1, + 'svc_acct' => 1, }; } @@ -27,11 +28,19 @@ 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 }; } +sub condition_sql { + my( $self, $table ) = @_; + + '('.FS::cust_pkg->status_sql . ') IN '. + $self->condition_sql_option_option('status'); +} + 1;