diff options
Diffstat (limited to 'FS/FS/part_event/Condition/agent.pm')
-rw-r--r-- | FS/FS/part_event/Condition/agent.pm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/FS/FS/part_event/Condition/agent.pm b/FS/FS/part_event/Condition/agent.pm new file mode 100644 index 0000000..da428c1 --- /dev/null +++ b/FS/FS/part_event/Condition/agent.pm @@ -0,0 +1,37 @@ +package FS::part_event::Condition::agent; + +use strict; + +use base qw( FS::part_event::Condition ); + +# see the FS::part_event::Condition manpage for full documentation on each +# of the required and optional methods. + +sub description { + 'Agent'; +} + +sub option_fields { + ( + 'agentnum' => { label=>'Agent', type=>'select-agent', }, + ); +} + +sub condition { + my($self, $object, %opt) = @_; + + my $cust_main = $self->cust_main($object); + + my $agentnum = $self->option('agentnum'); + + $cust_main->agentnum == $agentnum; + +} + +#sub condition_sql { +# my( $self, $table ) = @_; +# +# 'true'; +#} + +1; |