This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / FS / FS / part_event / Condition / agent.pm
1 package FS::part_event::Condition::agent;
2
3 use strict;
4
5 use base qw( FS::part_event::Condition );
6
7 # see the FS::part_event::Condition manpage for full documentation on each
8 # of the required and optional methods.
9
10 sub description {
11   'Agent';
12 }
13
14 sub option_fields {
15   (
16     'agentnum'   => { label=>'Agent', type=>'select-agent', },
17   );
18 }
19
20 sub condition {
21   my($self, $object, %opt) = @_;
22
23   my $cust_main = $self->cust_main($object);
24
25   my $agentnum = $self->option('agentnum');
26
27   $cust_main->agentnum == $agentnum;
28
29 }
30
31 #sub condition_sql {
32 #  my( $self, $table ) = @_;
33 #
34 #  'true';
35 #}
36
37 1;