1 package FS::part_event::Condition::agent;
5 use base qw( FS::part_event::Condition );
7 # see the FS::part_event::Condition manpage for full documentation on each
8 # of the required and optional methods.
16 'agentnum' => { label=>'Agent', type=>'select-agent', multiple => '1' },
21 my($self, $object, %opt) = @_;
23 my $cust_main = $self->cust_main($object);
25 my $hashref = $self->option('agentnum') || {};
26 grep $hashref->{ $_->agentnum }, $cust_main->agent;
31 my( $class, $table, %opt ) = @_;
33 "cust_main.agentnum IN " . $class->condition_sql_option_option_integer('agentnum', $opt{'driver_name'});