diff options
Diffstat (limited to 'FS/FS/part_event/Condition/pkg_status.pm')
-rw-r--r-- | FS/FS/part_event/Condition/pkg_status.pm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/FS/FS/part_event/Condition/pkg_status.pm b/FS/FS/part_event/Condition/pkg_status.pm new file mode 100644 index 0000000..6c1c9cc --- /dev/null +++ b/FS/FS/part_event/Condition/pkg_status.pm @@ -0,0 +1,37 @@ +package FS::part_event::Condition::pkg_status; + +use strict; + +use base qw( FS::part_event::Condition ); +use FS::Record qw( qsearch ); + +sub description { + 'Package Status'; +} + +sub eventtable_hashref { + { 'cust_main' => 0, + 'cust_bill' => 0, + 'cust_pkg' => 1, + }; +} + +#something like this +sub option_fields { + ( + 'status' => { 'label' => 'Package Status', + 'type' => 'select-cust_pkg-status', + 'multiple' => 1, + }, + ); +} + +sub condition { + my( $self, $cust_pkg ) = @_; + + #XXX test + my $hashref = $self->option('status') || {}; + $hashref->{ $cust_pkg->status }; +} + +1; |